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

Should probably do `.length` to detect it's iterable and not do a type check since that's an anti pattern anyway.


That would happily accept and iterate over a string, which wouldn't be desirable.




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

Search: