Created
July 13, 2012 20:27
-
-
Save jamiltron/3107232 to your computer and use it in GitHub Desktop.
addOne
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
/** @const */ var ONE = 1; | |
/** | |
* A function to add 1 to a number. | |
* @param {number} n a number to be added. | |
* @return {number} The number + 1. | |
*/ | |
var addOne = function (n) { | |
return n + ONE; | |
} | |
/** @type {number} */ var num = null; | |
console.log(addOne(num)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment