There are three comment methods in the javascript language.
The first is to comment "/**/", which is generally the beginning of a js file, introducing the author, function and other information.
Copy the code as follows:/*
*author:xxx
*day:2008-08-10
*/
The second annotation method is the most common "//", which can be seen everywhere between programs, and can only comment single lines.
Copy the code as follows: // This is a one-line comment, and only a single line is commented.
//Other line of comment
The third type of annotation is not very common and will be confused with the annotation in the html and is not recommended.
The code copy is as follows:<!-This is a one-line comment, and only a single line is commented.
The third method is followed by not adding -->, which is different from the html annotation.
Summary: I recommend you to use the first method of multi-line comments. As for why? If you want to comment 100 lines of code, just add comments at the beginning and end. You need to use the second one, add each line, and the file will have more bytes.