Skip to content

Instantly share code, notes, and snippets.

@erikeldridge
Created June 3, 2011 05:10
Show Gist options
  • Save erikeldridge/1005906 to your computer and use it in GitHub Desktop.
Save erikeldridge/1005906 to your computer and use it in GitHub Desktop.
/**
* @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){
//...
}
// Use assertion code
function barracuda(toothCount, weight, length){
assert("number" === typeof toothCount);
//...
}
// 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