works successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g.
Notes on hoisting
(I may be using incorrect terms below, please forgive me)