Besides scopes issue, some folks also mention hoisting, but no one gave an example. Here's one for global scope:
console.log(noErrorCase);_x000D_
var noErrorCase = "you will reach that point";
_x000D_
console.log(runTimeError);_x000D_
runTimeError = "you won't reach that point";
_x000D_