Skip to content

Glossary: JavaScript Basics

while

Also written: while loop

A loop that checks its condition, runs the block if it's true, then checks again. It suits jobs where you don't know how many passes are needed.

Where the book teaches it

Related terms

Infinite loopfor loopLoop