0
I need explanations on for loop, while loop nesting. Explanations from the scratch
3 Answers
+ 1
TheĀ for statementĀ creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons, followed by a statement (usually aĀ block statement) to be executed in the loop
+ 1
TheĀ while statementĀ creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.