Comments in JavaScript

Comments in JavaScript
Rating: 5 - 1 Votes

Comments in JavaScript

JavaScriptComments in JavaScript are pretty much similar to PHP.  There are 2 types of comments, single-line comment and multi-line comment.  Single-line comment is useful in case of providing small information about the code.  Multi-line comment is useful in case of providing detailed information about the code.  Single-line comment starts with 2 forward slashes (//).  Multi-line comment starts with /* and ends with */.  Example of both the comments is given below.