javaScript comment

The text / code lines of javaScript are used to comment it is not displayed in the web page to the user, the web developer gives the comment for themselves in the source code, in this the description of the code (Explanations) can be given which read the source code. This helps in understanding and therefore developers use the comment.

1 javascript Single line comment

Symbol of double forward slash (//) is placed next to the text / code lines in javaScript that have to be commented.



2 javascript Multiple line comment

Symbol of asterisk (*) and forward slash (/) is placed at the end of forward slash (/) and asterisk (*) and text / code lines to comment two or more text / code lines in javaScript.






Example 1

<!DOCTYPE html>







//single line comment Example

document.write("single line comment Example ");




/* multiline comment example multiline comment example */

document.write("multiline comment example");





single line comment Example
multiline comment example

Connect with us

facebook logo
Email :
© Copyright 2020 - 2023 All Rights Reserved.
About us     term and condition      comment policy Protection Status