Skip to content

Instantly share code, notes, and snippets.

@dannycallaghan
Created October 17, 2013 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannycallaghan/7023238 to your computer and use it in GitHub Desktop.
Save dannycallaghan/7023238 to your computer and use it in GitHub Desktop.
Fast JavaScript Max/Min, John Resig. From http://ejohn.org/blog/fast-javascript-maxmin/
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