Skip to content

Commit

Permalink
Merge pull request #263 from IcySlurpee/patch-1
Browse files Browse the repository at this point in the history
clarify for-loop challenge wording to fix #220
  • Loading branch information
ledsun committed Aug 17, 2019
2 parents 62945d2 + df25ad3 commit efaa357
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions problems/for-loop/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ On each iteration of the loop, add the number `i` to the `total` variable. To do
total += i;
```

When this statement is used in a for loop, it can also be known as _an accumulator_. Think of it like a cash register's running total while each item is scanned and added up. For this challenge, you have 10 items and they just happen to be increasing in price by 1 each item (with the first item free!).

After the for loop, use `console.log()` to print the `total` variable to the terminal.

Check to see if your program is correct by running this command:
Expand Down

0 comments on commit efaa357

Please sign in to comment.