Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the multiline comment symbol of JavaScript

Shulou Source: shulou.com Published: 2022-06-02 17:49:21 10月13日 Update

This article mainly explains the "JavaScript multiline comment symbol is what", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "JavaScript multiline annotation symbol is what" it!

In JavaScript, the multiline comment symbol is "/ * * /" and the syntax is "/ * comment content * /". Everything that appears between "/ *" and "* /" is treated as the content of the comment and is automatically ignored when executed.

The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.

In JavaScript, the multiline comment symbol is "/ * * /"; multiline comments begin with / * and end with * /.

Syntax:

/ * comment content * /

Everything that appears between / * and * / is treated as the content of the comment, and any character contained between the / * and * / symbols is ignored as the comment text.

JavaScript / * add the specified content to the tag whose id attribute is demo * / document.getElementById ("demo") [xss_clean] = "http://c.biancheng.net/js/";"

Multiline comments generally start at the beginning of the js file, introducing the author, function and other information.

/ * * author:xxx*day:2008-08-10pm /

In addition to adding explanations or descriptions to the code, we can also comment out the code that we don't need to run when debugging the code, so that the browser ignores the code in the comments when running the program. As shown in the following example:

Document.getElementById ("demo") [xss_clean] = "JavaScript tutorial"; / / document.getElementById ("demo") [xss_clean] = "JavaScript"; / * document.getElementById ("demo") [xss_clean] = "comment"; document.getElementById ("demo") [xss_clean] = "JavaScript comment" * / Thank you for your reading, the above is the content of "what is the JavaScript multiline comment symbol". After the study of this article, I believe you have a deeper understanding of what the JavaScript multiline comment symbol is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Comments content multiple lines symbols code between learning beginning tutorials syntax runs authors information functions characters that is attributes ideas situations files Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS NVidia Shulou Tech Info Apple