What does javascript annotation include?

藏色散人
Release: 2022-01-19 15:03:01
Original
4486 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:

c030c32b2413ddeb294650af21b46ce1

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:
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