Why not NodeList#forEach :\?

Rick Waldron waldron.rick at gmail.com
Mon Jun 11 05:29:38 PDT 2012



On Monday, June 11, 2012 at 6:30 AM, Hemanth H.M wrote:

> [].forEach.call(NodeList,function(elm) {}) why that? Why not treat it like an [] ? 
> 
ES6 draft specifies a new Array constructor called Array.from that will essentially convert "array-likes" into arrays:

Array.from( nodes ).forEach(...

Rick
 
> 
> -- 
> 'I am what I am because of who we all are'
> h3manth.com (http://www.h3manth.com)
> -- Hemanth HM 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120611/74db4d8c/attachment.html>


More information about the es-discuss mailing list