Creating a basic JavaScript to add 100, 15 times to equal out to 1500. However, the code down below that I did is not triggering and only returning 0. I'm pretty sure I'm over thinking this or having my variables be called incorrectly.
var monthlyDeposit = 100; // Code will be tested with values: 100 and 130
var accountBalance = 0;
/* Your solution goes here */
for (c = accountBalance; c <= 15; c += monthlyDeposit) {
console.log(c);
}
cstarts at 0 and gets incremented by 100 each time, so only the first iteration (whilecis below 15) runs...?c <= 15toc <= 1500?