$count = 0; while ($count < 10) { $count += 1; print "count is now $count\n"; }
I don't get it. Why is it printing till 10 if the conditional expression asserts it should be less than (<) 10 and not less than or equal (<=) to 10? Shouldn't it print just till 9?
In reply to Not understanding while loop counting by zapdos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |