I'm supposed to use a while loop to traverse this array and multiply each item by 2. The page just keeps loading forever when I try to run it.... What am I missing? Thank you.
var prices = [4, 5, 8, 10];
var i = 0;
while (i < prices.length){
prices[i]++;
i*=2;
}
console.log(prices);