4
ES6 introduced the Keywords let
and const
for variable declaration.
There is still reason to use var
? If yes, in which scenarios to use?
4
ES6 introduced the Keywords let
and const
for variable declaration.
There is still reason to use var
? If yes, in which scenarios to use?
2
Well, doing a brief search on the internet, including on Soen, there is no stated advantage. Until then, let
and const
offer in a certain way a certain 'protection, by following rules' to more than the var
, but do the same job.
To say no advantage, some browsers still do not accept the declaration of let
and const
, but other than that, the var
can already be retired.
Browser other questions tagged javascript ecmascript-6 variable-declaration
You are not signed in. Login or sign up in order to post.
see http://www.matera.com/br/2017/05/09/javascript-6-diferenca-entre-var-let-e-const/
– user60252