Created
November 17, 2021 01:08
-
-
Save jsmithdev/3ab52a4e23be96acf5d3f7a40132e753 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
function dbl(x){ | |
return x+x | |
} | |
Array.from(Array(30).keys()) | |
.reduce((acc, curr, index) => { | |
acc = acc === 0 ? .01 : dbl(acc) | |
console.log('day ', index+1, ': $', acc) | |
return acc | |
}, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment