Two forward slashes (//) begin single-line Javascript comments. Even if the commented text contains forward slashes, every content after the two forward slashes until the end of a line constitutes a comment.
In JavaScript, there are two types of comments.
Single-line remark
Comment with several lines.
Place two slashes "//" in front of the code or text you want the JavaScript interpreter to disregard to make a single line comment in JavaScript.
One or more lines of narrative are contained within a set of comment delimiters in multi-line comments. The comment begins with the /* delimiter and ends with the */ delimiter. Anything between those delimiters is considered a comment, therefore your comment can span numerous lines.
There is no distinction at all. All comments are eliminated such that they have no effect on the programme during execution, regardless of their format.
Share a personalized message with your friends.