Hacker News new | past | comments | ask | show | jobs | submit login

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



Bad 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.


I know right. Principle of least Privilege. Simple.


to get variable defined in function scope? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: