loading...

re: Demystifying "const" variables in JavaScript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: 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

code of conduct - report abuse