You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
A variable declared using var can end up having an unexpected effective scope. It actually makes no difference in this case but people generally discourage the use of var and switch to let or const instead.
ed8edc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we usually use
let
instead ofvar
in ES6ed8edc8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A variable declared using
var
can end up having an unexpected effective scope. It actually makes no difference in this case but people generally discourage the use ofvar
and switch tolet
orconst
instead.