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

These days in JS you can just use let instead of var and it will work, but in itself that inconsistency is a bit weird


Yeah, let/const is what I tend to use. Here I wanted to change someone else's code as little as possible.

Edit: Oh, right, it also solves the 10-issue. Thanks, didn't realise at first.




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

Search: