One reason to use var: prototype something in the browser console and get something wrong, for that session your const won't be changeable, so use var for fast prototyping
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
It's always been my rule of thumb.
Use const. If you need to reassign it, change the variable to let. No reason to use var anymore.
One reason to use var: prototype something in the browser console and get something wrong, for that session your const won't be changeable, so use var for fast prototyping