Javascript surprises.
Q: What happens when I run:
console.log(dne);
A: Reference Error because dne does not exist.
Q: How about:
console.log(window.dne);
A: Undefined, even though all properties on the host object (window) the same as global variables
Q: How about:
(function() {
console.log(dne);
var dne ="they do exist!";
})()
A: Undefined, the presence of var anywhere in the function declares but does not initialize the variable.