Comments Flashcards
1
Q
Why use Comments?
A
to explain JavaScript code
easier to read
used to prevent execution
2
Q
What does a Single Line Comments started with?
A
//
3
Q
Any text between // and the end of the line
A
will be ignored by JavaScript (will not be executed)
4
Q
What does Multi-line Comments started with?
A
start with /* and end with */
5
Q
Will the multi-line comment show within the HTML page?
A
No, the comment lines will be ignored.
6
Q
How can you Prevent Execution by using a comment lines?
A
Adding // in front of a code line changes the code lines from an executable line to a comment
This is great for code testing.