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