0
What is the difference between for-loop and if-else statements
2 Antworten
+ 7
For-Loop is an looping statement and If-Else is Conditional statement.
0
They're two completely different things.
When you use a for loop, the code inside it executes until the condition of the loop is true.
When you use if-else, if the condition is true you run the code inside the "if", otherwise you run the code inside the "else", but only once.