Function Scope - example -1
Example: Function Scope - example -1
// The following variables are defined in the global scope
var x = 12, y = 25;
// This function is defined in the global scope
function add(){
return (x + y);
}
add(); // Returns 37