Skip to content

Instantly share code, notes, and snippets.

@hfadev
Created July 28, 2012 12:29
Show Gist options
  • Select an option

  • Save hfadev/3193114 to your computer and use it in GitHub Desktop.

Select an option

Save hfadev/3193114 to your computer and use it in GitHub Desktop.
Javascript: Reference
//----Functions----
//arguments usage
function min(){
var min = Number.POSITIVE_INFINITY;
for( var i = 0; i < arguments.length; i++){
if( arguments[i] < min ){
min = arguments[i];
}
}
return min;
}
min(100,8,90); //returns 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment