Skip to content

Instantly share code, notes, and snippets.

@JidLaurence
Created January 1, 2024 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JidLaurence/a346067e553970060b62a97a5152165b to your computer and use it in GitHub Desktop.
Save JidLaurence/a346067e553970060b62a97a5152165b to your computer and use it in GitHub Desktop.
Test 4
function summarizeNumber() {
let i = 0;
let total = 0;
while (i < arguments.length) {
total += arguments[i];
i++;
}
return total;
}
const result = summarizeNumber(5, 11, 19, 99);
console.log(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment