3 ms·
The question have error. You need to call `foo()` before the first `console.log` to get that behavior. function foo() { let a = b = 0 a++
by j16sdiz 5y ago
The question have error.
You need to call `foo()` before the first `console.log` to get that behavior.
function foo() {
let a = b = 0
a++
return a
}
foo() // <------ INSERT THIS
console.log(typeof a)
console.log(typeof b)