-
Notifications
You must be signed in to change notification settings - Fork 62
Improve level1.js and fix bug in level3.js #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| /* | ||
| Multi-line comments look like this. | ||
| When you are writing actual code, put it outside these comment blocks, |
There was a problem hiding this comment.
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!'); |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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]; |
There was a problem hiding this comment.
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
|
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mistype here in lkike
Just some suggested changes from what I've observed mentoring this workshop, and a bugfix. See inline comments :)