belmer
8/23/2017 - 3:20 PM

example1

example1

var animal = 'dog';
function whatAnimal() {
    console.log(animal);  // undefined (not dog)
    var animal = 'cow';
    console.log(animal);  // cow
}