Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

const. I always use const and if I need to mutate a variable, then let.

var is pretty much just for legacy codes. Yes, it has unique behaviors, but better stick to the new keywords, can prevent some headaches.



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

Search: