keyword inside functions. Should I use them? I mean, if I want a variable that I'm going to use just inside an event handler or a function, should I specify var?
Yes, it's good to specify var keyword, makes code readable
Always use let when it will change and const when it won't. var has shall I say confusing scoping behaviors
const > let > var > implicit global
Обсуждают сегодня