by twistedpairs · 6y ago · 0 comments
[...Array(31).keys()]
.map(num => Math.pow(2,num))
.reduce((total,num) => total + num)
/ 100
$21,474,836.47or since the sum is equal to the next sequential (2 to power of n+1) minus 1 cent => 2^31 - 1 = $21,474,836.47
No comments yet.