Last active
August 2, 2023 19:32
-
-
Save willie-hung/e2f071899a640d0f9544bf91e0cabe8a to your computer and use it in GitHub Desktop.
post_32
This file contains 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
// Purpose: Function to sum a list of numbers. | |
export default function sum(...args: number[]): number { | |
return args.reduce((a, b) => a + b, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment