var and when
What are the pros and cons?
I would appreciate code examples.
letkeyword varialbes do not have varialble hoisting
letvariable can be created in bracket scope and is removed after scope ends,
varvariable too, but is available still after the scope, e.g.
for (let i = 0; ...creates
ivariable for loop only.
That article describes difference better: