AdsReg.com Magazine Logo
📌 Press Ctrl+D to bookmark this page.

Comments-Notes

Single Line Comments

Single line comments start with //.

Any text between // and the end of the line will be ignored by JavaScript (will not be executed).

This example uses a single-line comment before each code line:

Sample1: Single Line Comments

JavaScript/003-Comments-Notes/001-Comments-Notes-SingleLine

Multi-line Comments

Multi-line comments start with /* and end with */.

Any text between /* and */ will be ignored by JavaScript.

This example uses a multi-line comment (a comment block) to explain the code:

Sample2: Single Multiple Line Comments

JavaScript/003-Comments-Notes/002-Comments-Notes-MultipleLine

Leave a Comment

Your email address will not be published. Required fields are marked *

AdsReg Magazine We would like to show you notifications for the latest news and updates. You can disable it when you want.
Dismiss
Allow Notifications