Q:

JavaScript For Loop double value 365 times

I am struggling to make a For Loop statement in JavaScript that will double .01 365 times (double a penny for a year).   Please help!
This doubles the penny but only up to the amount of 365...how do i get it to double 365 times?
var i = .01
for (; i < 365; i *=2){
    console.log(i);
}

Thank you for your help!!

A:

If you know precisely how many times you need to double the number (365 in this case), then you really don't even need a for loop. You can just multiple by a power of two:
let i = 0.01 * Math.pow(2, 365); 

