Created
June 3, 2011 05:10
-
-
Save erikeldridge/1005906 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* @param {number} toothCount is the number of teeth in the barracuda's mouth (required) | |
* @param {number} weight is the weight of the barracuda | |
* @param {number} length is the length of the barracuda | |
*/ | |
function barracuda(toothCount, weight, length){ | |
//... | |
} |
This file contains 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
// Use assertion code | |
function barracuda(toothCount, weight, length){ | |
assert("number" === typeof toothCount); | |
//... | |
} |
This file contains 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
// Adhere to function argument description: | |
// @param {number} toothCount is the number of teeth in the barracuda's mouth (required) | |
function barracuda(toothCount, weight, length){ | |
// Assume toothCount is defined and is a number | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment