Created
July 25, 2017 18:00
-
-
Save selfup/803ae2d546db7183f8a2eba18c85664a 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
return Object.assign( | |
{}, // << this is the important part - LOOK HERE! | |
cache, | |
{ [num]: (fib(num - 1, cache) + fib(num - 2, cache)) }, | |
)[num]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment