Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created July 5, 2019 15:27
Show Gist options
  • Save indreklasn/5ce2dcc96671fa1a561b4283a1d2a349 to your computer and use it in GitHub Desktop.
Save indreklasn/5ce2dcc96671fa1a561b4283a1d2a349 to your computer and use it in GitHub Desktop.
const add = (...nums) => {
return nums.reduce((total, num) => total + num);
}
add(1, 2, 3); // 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment