If you don't mind tech-related ads, and want to keep us running, whitelist JSFiddle in your ad blocker.
Thank you! ❤️
Whats the final number
Which one of these three definitions of foo win ?
the Compiler for js runs the var first hence why you get a undefined and not a reference error