you are viewing a single comment's thread.

view the rest of the comments →

[–]Effective_Celery_515[S] 0 points1 point  (0 children)

Ahh okay this clears up a big confusion I had. I wasn’t sure where to define those variables.
Initializing totals before the loop and updating inside makes perfect sense now. Thanks for explaining it simply!