Last active
February 14, 2016 20:16
-
-
Save prozbik/74c51df6ca6fef47fa76 to your computer and use it in GitHub Desktop.
summation of all numbers from 1 up to x included
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 summation = x => Number.isInteger(x) ? x * (x + 1)/2 : 'Invalid Value'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment