Created
January 31, 2021 13:44
-
-
Save rstropek/f9591a9fc47d67f5c63c287fe6700e86 to your computer and use it in GitHub Desktop.
math.js (failing test)
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 = 1; 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