Array.toArray = function(anything) { var array = []; for (var l = anything.length, l--; ) { array[i] = anything[i]; } return array; };