JS Test: Variable Hoisting

Last modified by Sergiu Dumitriu on 2018/10/10 17:05

Task: What does the following code return? Why?

if (!("a" in window)) {
 var a = 1;
}
typeof a;