India's First Software Developer Community

Comments In Javascript

How To Use Comments In Javascript.
    Comments are used to hide some code for executions, commented code not executed by     browser.

    There are two type of comments
    1) Singleline
    2) Multiline

    Singleline Comment Used by "//".

    Multiline Comment Used by "/*"  "*/".

    You Can Hide any data of javascript in Commnets

<!DOCTYPE html>
<title> Comment in Javascript | W3CodeIndia </title>
<center><p id="w3code"></p></center>
<center><p id="w3codeindia"></p></center>
<center><p id="javascript"></p></center>
//document.getElementById("w3code").innerHTML="Welcome To W3Codeindia ";  Single line Comment
Multiline Comment
document.getElementById("w3codeindia").innerHTML="Javascript Section ";
document.getElementById("javascript").innerHTML="Comments in Javascript";


Subscribe Us :

Chapters :-