Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Local JavaScript Variables

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 126
    Comment on it

    Local JavaScript Variables

    A variable declared inside a function has the scope only in that function, thus the variable is the local variable. The variable doesn't have any recognition out side the function definition.

    Local variables scope starts with function and gets deleted when the function execution completes.

    For Example:

    // code here can not use variable name
    
    function fun() {
        var name = "John";
    
        // code here can use name
    
    }
    

 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: