Header add

In this article we will discuss how to set JavaScript comment. Please follow the previous article of How to write Statements in JavaScript.

What is Comment ?

Comments in JavaScript are used to explain the code and make the program more readable for developers. There are single-line comments (which comment out one line or a part of one line) and multi-line comments (which comment out a block of code). Multi-line comments are more often used for formal documentations.

The single line comment can start with “//” (double forward slashes) and multi-line comment should be wrapped inside “/*” (forward slash and asterisk) and “*/” (asterisk and forward slash) characters. The script can write below as;

You can check the demo in below ;





  Summary
In this tutorial we discussed Comment in JavaScript. If have any question related to this topic then give your feedback.


You May Also Like...



Post a Comment

Previous Post Next Post