An important thing to note is that there are no good reasons for using var over let. let is what var should have been all along to not be confusing.
var
let
So forget about var and just use let (or even better, use const) 😉
const
Absolutely , this is a es5 question , today ill post the es6 version the differences between let and const
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
An important thing to note is that there are no good reasons for using
var
overlet
.let
is whatvar
should have been all along to not be confusing.So forget about
var
and just uselet
(or even better, useconst
) 😉Absolutely , this is a es5 question , today ill post the es6 version the differences between let and const