Get the App
SLTechnology News&Howtos  ›  Development  › 

How to implement multiline comments in js

Shulou Source: shulou.com Published: 2022-06-01 03:24:48 09月22日 Update

This article will explain in detail how to achieve multi-line comments in js. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Multiline comment

Multiline comments begin with / * and end with * /.

Any text between / * and * / will be ignored by JavaScript.

This example uses multiline comments (comment blocks) to explain the code:

Example

/ * the following code changes the title of id = "myH" and the paragraph of id = "myP" in the page: * / document.getElementById ("myH") [xss_clean] = "my first page"; document.getElementById ("myP") [xss_clean] = "my first paragraph."

Comments: it is most common to use single-line comments.

Tip: comment blocks are often used for official declarations.

This is the end of this article on "how to achieve multi-line comments in js". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Tags: Comments multilines articles code more paragraphs good practical between content official examples common beginning text article most title knowledge web page Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Docker macOS Shulou Tech Info OPPO Reno