CompTIA IT Fundamentals FC0-U61 – Question279

Which of the following should a developer use to ensure a block of code executes a defined number of times?


A.
for loop
B. while loop
C. if … else statement
D. switch statement

Correct Answer: A

Explanation:

Reference: https://www.cs.utah.edu/~germain/PPS/Topics/for_loops.html#:~:text=…
%20is%20used,from%201%20to%20that%20number