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

It's actually a Javascript strength; one that makes it more dynamic.

    NodeList.prototype.map = Array.prototype.map
Just one line and now you can do stuff like:

    document.querySelectorAll("div").map(function(ele){
      return ele.id
    });


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

Search: