Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created August 2, 2017 13:43
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 debugmodedotnet/9ed3e25f53296fcfc1c1b4d8feb3d718 to your computer and use it in GitHub Desktop.
Save debugmodedotnet/9ed3e25f53296fcfc1c1b4d8feb3d718 to your computer and use it in GitHub Desktop.
function add(...theArgs){
var result = 0;
for(let i=0;i<theArgs.length;i++){
result = result + theArgs[i];
}
return result;
}
var r = add(6,9,3,2);
console.log(r);
var t = add(7,56,9);
console.log(t);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment