How to implement multiline comments in js
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.