Last active
August 29, 2015 14:03
-
-
Save JosePedroDias/f81fca237e618a7cc744 to your computer and use it in GitHub Desktop.
use this for nodeList to array conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var listToArr = function(lst) { | |
var l = lst.length; | |
var arr = new Array(l); // optimizable *list-to-array | |
for (var i = 0; i < l; ++i) { | |
arr[i] = lst[i]; | |
} | |
return arr; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment