98,945 views
22 votes
22 votes
Brooke is trying to save enough money in the next year to purchase a plane ticket to Australia. Every month Brooke saves $200. Write a for loop that displays how much money Brooke will save at the end of each month for the next 12 months.

User Prathap Reddy
by
2.7k points

1 Answer

25 votes
25 votes

Answer:

var monthlyDeposit = 200;

var accountBalance = 0;

for(var i = 0;i<12;i++){

accountBalance += monthlyDeposit;

console.log(accountBalance);

}

User Jessikwa
by
2.8k points