Horje
How to Create a Multi Line Comment in JavaScript ?

In JavaScript, you can create multi-line comments using the /* and */ delimiters. Everything between these delimiters, regardless of line breaks, is treated as a comment and will not be executed.

/*
This is a multi-line comment
It can span multiple lines
All text between /* and */ is ignored by the JavaScript interpreter
*/

let x = 5;

/*
Multi-line comments are often used for larger blocks of explanations,
documentation, or temporarily excluding multiple lines of code.
*/

In the example above, the content between /* and */ is a multi-line comment. It can span multiple lines, and the JavaScript interpreter will ignore all the text.




Reffered: https://www.geeksforgeeks.org


JavaScript

Related
How to Exit a Loop Before it Completes all Iterations in JavaScript ? How to Exit a Loop Before it Completes all Iterations in JavaScript ?
How to use the ! Operator to negate a Boolean Value in JavaScript ? How to use the ! Operator to negate a Boolean Value in JavaScript ?
What is the use of the Prompt Function in JavaScript ? What is the use of the Prompt Function in JavaScript ?
What is the use of the Alert Function in JavaScript ? What is the use of the Alert Function in JavaScript ?
What is the use of the Confirm Function in JavaScript ? What is the use of the Confirm Function in JavaScript ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
15