Javascript’s comment symbol is the dual // at the beginning of the line.
Comments become helpful when writing Javascript. Using the comment function forces the computer to ignore or skip everything else on the line. Comments let us separate sections of the code, write reminders and notes, annotate where snippets came from, and let us disable lines of code for troubleshooting.
Example:
//This is a comment. //The computer executing Javascript will ignore everything after the dual forward slashes.
Don’t forget about multi-line comments Steve. They begin with /* and end with */ so you can define an end point for your comment.
This is useful if you are typing out multiple lines for your comment or if you are adding a comment WITHIN a line of code and need the comment to end.
Good tut.
Yeah, sure beats putting // at the beginning of every line.