Home > Web Front-end > Front-end Q&A > What does javascript annotation include?

What does javascript annotation include?

藏色散人
Release: 2022-01-19 15:03:01
Original
4634 people have browsed it

Javascript comments include three types, namely: 1. Multi-line comments, the symbol is "/**/"; 2. Single-line comments, the symbol is "//"; 3. Single-line comments, the symbol is "

What does javascript annotation include?

The operating environment of this article: Windows 7 system, javascript version 1.8.5, DELL G3 computer

What does the javascript comment include?

There are three comment methods in JavaScript language.

The first is multi-line comments "/**/", generally at the beginning of the js file, the author, function and other information are introduced.

The code is as follows:

e26edce6aa8ec83fde313135f819845f

The third method is not to add -->, this is different from html comments.

Summary:

It is recommended that you 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. If you need to use the second method, you have to add comments on each line, which will increase the number of bytes in the file.

Recommended study: "JS Basic Tutorial"

The above is the detailed content of What does javascript annotation include?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template