Your question 3 is wrong. Why?

1) You don't output anything.

2) You have no return, so if by "output" you meant return, it's null.

Though I assume by "output" you mean the value of A, which with no VAR/LET/CONST attempts to access the global.

And a lot of these show quite well why I think LET and CONST are dumbass trash that just make things even more complex and hard to maintain.

Just as how most of the time assigning functions to variables is a bit dumbass, as are those derpy painfully cryptic arrow functions where I swear the ECMA won't be happy until JS looks like brainf***.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store