Created
July 28, 2012 12:29
-
-
Save hfadev/3193114 to your computer and use it in GitHub Desktop.
Javascript: Reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //----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