Which part of a "for" loop is executed only once, when the loop starts?
- Initialization
- Condition
- Increment
- Body of the loop
The part of a "for" loop that is executed only once, when the loop starts, is the initialization. It is where you define and initialize loop control variables. The condition is checked before each iteration, the increment is executed after each iteration, and the body of the loop contains the code that is executed repeatedly until the condition is false.
Loading...
Related Quiz
- Which of the following options is a technique to manage callback hell in JavaScript?
- The shift() method will return _______ when it is used on an empty array.
- Arrow functions are not suitable for defining _________ functions.
- In a do-while loop, when is the condition checked?
- The method _______ is used to sort the elements of an array.