What are the various types of 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
*/
raja
Published on 25-Jan-2018 14:05:23
Advertisements