Skip to content

Instantly share code, notes, and snippets.

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