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)
You need to call `foo()` before the first `console.log` to get that behavior.