Get Programming with JavaScript - Listing 11.02
Listing 11.02 - Accessing a variable from within a function
var mountain = "Ben Nevis";
var showMountain = function () {
console.log(mountain);
};
showMountain();
var mountain = "Ben Nevis";
var showMountain = function () {
console.log(mountain);
};
showMountain();