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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 145
    Comment on it

    A JavaScript variable is simply a name of storage location. There are two types of variables in JavaScript : local variable and global variable.

    There are some rules while declaring a JavaScript variable:.

    1)Name must start with a letter (a to z or A to Z), underscore( _ ), or dollar( $ ) sign.

    2)After first letter we can use digits (0 to 9),

    3) JavaScript variables are case sensitive.

    <html>
    <body>
    <script>  
    var x = 10;  
    var y = 20;  
    var z=x+y;  
    document.write(z);  
    </script>  
    </body>
    </html>
    

 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: