There are three types of JavaScript comments, namely: 1. Multi-line comments, starting with "/*" and ending with "*/", with the syntax "/* comment content*/"; 2. Single-line comments Comments start with double slashes "//", and the syntax is "//comment content"; 3. Line comments, the syntax is "
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
There are three comment methods in JavaScript (js) language
The first oneis a multi-line comment"/**/
", generally at the beginning of a js file, introduce the author, functions and other information.
The third method is not to add --> after it. This is different from html comments.
[Recommended learning: javascript advanced tutorial]
The above is the detailed content of There are several types of comments in javascript. For more information, please follow other related articles on the PHP Chinese website!