+ 1
How to put the if condition into a loop statement
2 Réponses
+ 3
You can add condition inside a loop, with or without suppress the condition into the parenthesis of the loop statement.
You need to manage yourself the exit of the loop, inside a branch of a if statement, with 'break' keyword ( I guess that no condition in 'for' statement parethesis is evaluated to true, else, you can set 'true' instead of nothing to obtain an infinite loop )...
- 1
;)