Lexical syntax
JavaScript line comment
A line comment continues until a line terminator or the end of source. Its contents are not executed as ordinary code. The delimiter inside a quoted string is not a comment opener.
Formal Syntax & Structure
javascript syntaxjavascript
// commentWorking Example
Example Snippetjavascript
// Explain the next line.console.log(2);