I\'ve been going through Javascript function scope and have run into this:
var scope = \"global\"; function f(){ console.log(scope); var scope = \"loca
Javascript sometimes behaves a bit differently from other languages. Take a look at http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html, they explain it a bit.