It should print undefined.
This is because of hoisting which happens to variable a. In case of declaring a variable with var keyword, the variable is hoisted to the current execution context, which for a is the enclosing function.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It should print
undefined
.This is because of hoisting which happens to variable
a
. In case of declaring a variable withvar
keyword, the variable is hoisted to the current execution context, which fora
is the enclosing function.