Skip to content

Conversation

@danny-wu
Copy link
Contributor

Just some suggested changes from what I've observed mentoring this workshop, and a bugfix. See inline comments :)


/*
Multi-line comments look like this.
When you are writing actual code, put it outside these comment blocks,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People often get confused and put code inside the comments. Hopefully this makes it clearer

There are a few ways you can do it and we will look into a few of them:
* alert('Hello girls!');
alert('Hello girls!');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People usually write things with the *, like *alert('Hello girls!');.

* is not used anywhere else in these files; so hopefully this makes it clearer.

This will pop-up an alert box with the number 4.
(You can see a full list of )
TIP: Note how we didn't put 1 and 3 in quotes, because they are numbers.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clarify, so people don't do '1' + '3' like people often do

Example:
var pageNode = document.querySelector('body')[0];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing [0] on a single Element is going to give you an error. You only need to do [0] if you're using document.querySelectorAll

@danny-wu
Copy link
Contributor Author

cc @ButenkoT

js/level1.js Outdated
A function is a reusable piece of code, an action that you want to do.
It takes some input (arguments), does some manipulation on it and returns
the output. Use the keyword 'return' to define the return value.
A function is lkike a blueprint, an action that you want to do.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mistype here in lkike

@danny-wu danny-wu merged commit dedc7a0 into muses-code-js:master Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants