DEV Community

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

Collapse
 
mtrantalainen profile image
Mikko Rantalainen • Edited

The only reason to use 'var' is to be compatible with some old info tv systems which have some weird more or less broken HTML renderers. There you cannot use any automated tools either because nobody really wants to support those things so you have to write fully custom implementations. If you don't need to support such things you shouldn't use 'var' anymore.