Skip to content

Instantly share code, notes, and snippets.

@iros iros/min.js
Created Feb 27, 2009

Embed
What would you like to do?
Extend the javascript Array object to include max/min routines using the apply method
Array.max = function( array ){
return Math.max.apply( Math, array );
};
Array.min = function( array ){
return Math.min.apply( Math, array );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.