Three ways to comment on JavaScript: 1. Use "/*" and "*/" symbols to comment, and the syntax is "/* Content to be commented */"; 2. Use "//" symbols to comment. Comment, the syntax is "//The content that needs to be commented"; 3. Use the "
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
JavaSciprt comments will not be read by the browser and will be automatically skipped. Writing comments is important for you to go back and check quickly later.
There are three comment methods in the JavaScript language:
The first is a multi-line comment "/**/", generally at the beginning of the js file, introducing the author, function and other information.
d8114750d11e8249ba470dba5b705f99The third method is not to add --> after it. This is different from html comments.
For more programming related knowledge, please visit: Programming Video! !
The above is the detailed content of What are the three comment methods of javascript. For more information, please follow other related articles on the PHP Chinese website!