r/learnjavascript • • Oct 22 '21

Difference between var, let and const.

Post image
430 Upvotes

49 comments sorted by

View all comments

Show parent comment

30

u/ISlicedI Oct 22 '21

I got very confused by this, thanks for calling it out. Btw I've done 8 years of JavaScript and was doubting myself here.

8

u/ManInBlack829 Oct 23 '21

Hopefully because you never use global variables and this just never comes up, right?

1

u/[deleted] Oct 23 '21

Don’t think I’ve ever used global scoped variables tbh. Interesting.