Похожие чаты

Hello guys, I'm uncertain of the use of the "var"

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?

3 ответов

15 просмотров

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

Похожие вопросы

Карта сайта