I\'ve been going through Javascript function scope and have run into this:
var scope = \"global\";
function f(){
console.log(scope);
var scope = \"loca
If you omit the var statement, the first log uses the global variable, which is set with the string "global". There is no other local variable and no hoisting.