Home > Web Front-end > JS Tutorial > What are the three comment methods of javascript

What are the three comment methods of javascript

青灯夜游
Release: 2023-01-06 11:17:24
Original
6509 people have browsed it

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 "

What are the three comment methods of javascript

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.

d8114750d11e8249ba470dba5b705f99

The 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template