Created
October 6, 2017 13:37
-
-
Save nicholasaiello/36844d96e898cafcaebfe37617e54dc8 to your computer and use it in GitHub Desktop.
Sum a sequence of numbers from 1 ... n
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
const sumToN = (n) => ( n * (n + 1) / 2 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment