3 ms·
I thought using "var" is deprecated... If there's anyone who has the chance to use let/const but still doesn't, I'd be very curious to learn about their reasoni
by positivecomment 9y ago
I thought using "var" is deprecated... If there's anyone who has the chance to use let/const but still doesn't, I'd be very curious to learn about their reasoning
- seangrogg 9y agoBad habits, arguably. Been using JS for years so occasionally instances where a more vigilant self would use "let" still get "var" instead. I think part of this is because of issues with previous versions of v8/node where using let at the global level or without 'use strict' threw errors. That being said, "const" is already hardwired.
- hippich 9y agoto get variable defined in function scope? :)
- vazhifarer 9y agoI know right. Principle of least Privilege. Simple.