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

That might be an improvement, but you probably wouldn't want to use Array.map, which generally has pretty terrible performance. See http://jsperf.com/map-vs-native-for-loop/5


Yes; the only reason for using Array.map() here is conciseness and similarity to the original code.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: