What is the difference between single-line and multi-line comments in JavaScript?

JavascriptWeb DevelopmentFront End Technology

Single Line comment

The following is a single line comment in JavaScript. Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.

// This is a comment. It is similar to comments in C++

Multi-Line comment

The following is a multi-line comment in JavaScript.

   * This is a multiline comment in JavaScript
   * It is very similar to comments in C Programming
Published on 22-Jan-2018 13:52:49