0
What is different betweem if loop and while loop
loop
4 Antworten
+ 5
"if" isn't a loop, it's a conditional (like "switch")
+ 4
loops are: while, do-while, for, foreach, for...in, ...
+ 1
if is for checking condition and its not loop.
0
if the condition is true the if block is executed once only.
the while block keeps being repeated as long as the condition stays true, this may even be forever if the while block does not modify the result of the condition!