How to write comments in JavaScript?

Posted by Ramesh Singh | Updated on

In this example, I have shared how to write comments in JavaScript with example. There are two ways to write comments in JavaScript:

  • Single-line comments
  • Multi-line comments

Single-line comments

Multi-line comments

JavaScript multiple line comment begins with /*, and ends with */.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers