- From: Jake Verbaten <raynos2@gmail.com>
- Date: Sat, 24 Dec 2011 02:09:57 +0100
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>, www-dom@w3.org
Received on Saturday, 24 December 2011 01:10:33 UTC
To add to the conversation. A recent jsperf http://jsperf.com/toarray-vs-slice shows that toArray and slice.call have similar levels of performance depending on array sizes. And I believe es.next will have Array.from ( https://mail.mozilla.org/pipermail/es-discuss/2011-July/015831.html ) which is basically an official readable method to turn an array like into an array. However as a web developer, I will add that the most common utility function I use when working with the DOM is a toArray function. I use a toArray function becuase "what does slice.call do?" is a common question.
Received on Saturday, 24 December 2011 01:10:33 UTC