let n = 5;
for (let a = 1, b = Math.pow(2, a); b <= n; a++) {
console.log(b);
}
I don't understand why b doesn't increase as a increases. Do I have to somehow pass a to b again?
If there's no way to make this loop work this way, can someone tell me how I could rewrite it so it works?