A variable whose name is bound to its value only within a local scope.

Example 

var global = 5; //is a global variable 

function fun(){
    var local = 10; //is a local variable  
}

Learn more

General knowledge

Document Tags and Contributors

Last updated by: mdnwebdocs-bot,