Created
October 8, 2018 04:54
-
-
Save rstropek/3f46a89db695baecba14613f70c03ac4 to your computer and use it in GitHub Desktop.
Code Snippet for Course "GitHub for Computer Science Classes"
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
exports.add = function (x, y) { | |
return x + y; | |
} | |
exports.sub = function (x, y) { | |
return x - y; | |
} | |
exports.sumOfPositiveNumbers = function (upperLimitInclusive) { | |
let result = 0; | |
for (let i = 0; i <= upperLimitInclusive; i++) { | |
result += i; | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment