// approach one: simply assign function to prototype // it works, but you still need to use "apply" to make the method // work as needed function smallest1(array){ Array.prototype.min = Math.min; return array.min.apply(array, array); } // approach two: use apply in the function assigned to Array's prototype function smallest2(array){ Array.prototype.min = function () { return Math.min.apply(Math, this); }; return array.min(); } function largest(array){ return Math.max.apply( Math, array ); } assert(smallest1([0, 1, 2, 3]) == 0, "Locate the smallest value."); assert(smallest2([0, 1, 2, 3]) == 0, "Locate the smallest value."); assert(largest([0, 1, 2, 3]) == 3, "Locate the largest value.");