Mix-in for Javascript's built-in Array object