CARD 1
Introduction
Login to report note issues for this section.
Loops — for, while, do-while
A loop is a control structure that repeats a block of code multiple times until a specified condition becomes false. Instead of writing the same code repeatedly, a loop handles repetition automatically.
Without loops:
codejs
With a loop:
codejs
JavaScript has three primary loop types: for, while, and do-while.