Skip to content

Instantly share code, notes, and snippets.

@ahomu
Created January 13, 2012 02:07
Show Gist options
  • Save ahomu/1604242 to your computer and use it in GitHub Desktop.
Save ahomu/1604242 to your computer and use it in GitHub Desktop.
iが大事なとき
// hayate.js内の関数から改変
function toArrayCopy(list) {
var rv= new Array(list.length), i = 0, iz = list.length;
for (; i<iz; i++) {
rv[i]= list[i];
}
return rv;
}
var NodeList = document.getElementsByTagName('div');
toArrayCopy(NodeList);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment