JavaScript Comments

Like HTML and CSS, JavaScript allows you to leave comments. They can be single-line and multi-line.

Here is an example of a single-line comment:

alert('Hello, World!'); // comment

Here is an example of a multi-line comment:

/* comment */ alert('Hello, World!');

Try both types of comments.

enru