Upstack Interview Question

Basic js stuff. Closures, hoisting etc.