How JavaScript Works(part 4):
Jul 21, 2022 · 4 min read · Hoisting In JavaScript(Variables and Functions) var x=1; function getName(){ console.log("function"); } getName(); console.log(x); What do you think the output will be? many of you will guess it right. output: function 1 But what if I invoke the func...
Join discussion