There are three of annotation methods in JavaScript language.
The first is multiline annotation "/**/", the general JS file at the beginning of the introduction of the author, functions and other information.
Copy Code code as follows:
/*
*author:xxx
*day:2008-08-10
*/
The second annotation method is the most common "//", which can be seen all over the program, with only a single note.
Copy Code code as follows:
This is a one-line comment that can only comment a single line.
Another line of comments
The third annotation is not very common and is confusing with comments within HTML and is not recommended.
Copy Code code as follows:
<!-This is a line of comments and can only comment on a single line.
The third way is not to add, this is not the same place as the HTML annotation.
Summary: recommend the method of using the first multiline annotation, as for why? If you want to annotate 100 lines of code, as long as the beginning and end of the comment is good, you want to use the second, each line to add, the file is more than the number of bytes.