I understand Hoisting of variables is done in Java Script. I am unable to get why it outputs as undefined
do_something() { var foo = 2; cons
Only the declaration is hoisted. the assigned variables are not hoisted. So you are