DEV Community

Discussion on: 3 reasons to use 'var' in JavaScript

Collapse
 
andrebradshaw profile image
Andre Bradshaw

Let and const are useful, but when people say var should never be used, I immediately start to question if they have done any interesting development in JS.

Additionally, for beginners, I would argue that using var forces people to deal with unexpected behaviors which is a useful method for actually learning how JS works.