Comments

When you are writing code, you will find it useful to write notes that explain some piece of code, but are not actually executed. There are two styles of commenting that JavaScript provides: inline (on a single line) and multiline. The syntax for these are slightly different, with inline comments starting with two characters “//” followed by the comment. These are meant to be on the same line as the comment, and are used either to explain what is happening on a line of code, or to quickly keep a line from executing during debugging. Multiline comments begin with the “/**” characters and end with the “*/” characters. Multiline comments allow you to put more detail into an explanation, or remove a larger block of code from execution during ...

Get Beginning Facebook Game Apps Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.