How to comment javascript code?
Comments can be added to explain the JavaScript, or to make the code more readable. With comments, you can add extra information pertaining to your code. Comments are ignored (i.e., are not processed as coding instructions) by the computer.
(//)
,For example-
// Description: This JavaScript code prints a simple message.
Multiline comments- Multiline comments span multiple lines. Multiline comments start with slash-asterisk (/*)
and end with asterisk-slash (*/)
pair. For example,
/* Author: Scripting Master Description: This JavaScript code prints a simple message.*/
Ads