Var, Let, Const and TDZ
Var, Let and Const
Before es6 only var was used to declare variables in JS, but with es6 came let and const. There were many problems related to var and thus it was necessary to have a new way of variable declaration.
Var
var can be scoped globally ...
aniketparihar.hashnode.dev4 min read
John Palmgren
Nice article. Very comprehensive. I hadn't heard the acronym TDZ before