Created
December 21, 2017 16:29
-
-
Save alpox/2f28ea3b66b2b7d86a84aedd44c1edc7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sumFibs=(num)=>(fib=((s,l=0,n=1,m=0)=>(n%2?n<=s&&(m+=n)&&0:0)||n>s?m:fib(s,n,l+n,m)))(num); | |
sumFibs(1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment