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

Javascript has first-class functions and anonymous functions, but so do lots of imperative languages, and there are plenty of other reasons to see Javascript as an imperative language. The reason we end up writing many anonymous functions is because we are using interfaces like foo.map(...) instead of interfaces like for-loops which take a block as a body (because Javascript for-loops are unbearably clumsy, e.g. iterating over properties instead of elements).


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

Search: