221k views
0 votes
The update expression of a for loop can contain more than one statement, e.g. counter++, total+= sales

True False

User Kuboslav
by
5.4k points

1 Answer

2 votes

True.

Update expression conditions the iterations of a for loop. Counter++ is the most basic form of use, but others like total += sales are also valid.

Hope this helps.

r3t40

User Anudeep GI
by
4.8k points