Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Javascript Comments

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 216
    Comment on it

    Javascript Comments

    Comments like in any other computer language are used for making the code understandable ie explaining the code in simple language.
    They are not executed by the javascript.
    There are two ways to enter the comments
    1. Single line ie after //
    2. Multi line ie between /* and */
    example:
    // Change heading:

    document.getElementById("myH").innerHTML = "My First Page";
    

    In this "Change heading" will not be executed. and
    /* The code below will change the heading with id = "myH" and the paragraph with id = "myP" :this is under comments */

    document.getElementById("myH").innerHTML = "My First Page";
    document.getElementById("myP").innerHTML = "My first paragraph."
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: