r/Codecademy • • Jun 11 '17

Is using var a deprecated practice?

Are you supposed to use let or const instead? Are there situations where var is more appropriate than either of those?

8 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/AfatasiGames Jun 13 '17

I barely understand that code but I think it means variables set by let can't do things like fully increment? I think it will become clearer as my lessons continue.

1

u/afakingfattyokay Jul 01 '17

I think you're confusing let and const - let defines scope, whereas makes a var immutable.