Use Array.prototype here and in all the other places you use []