JavaScriptSyntax
Write a Comment
Code example
// line comment
/* block comment */Adds single-line or multi-line comments.
In JavaScript, write a comment: adds single-line or multi-line comments — // line comment /* block comment */
// line comment
/* block comment */// line comment
/* block comment */Adds single-line or multi-line comments.
Use // line comment /* block comment */.
Use this pattern: // line comment /* block comment */
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.