Chapter
Loops, functions, and collections
<p>Repeat work deliberately, package behavior into functions, and organize related values.</p>
Lessons
-
Loops and iteration
Use for...of and while loops to process values or repeat work until a condition changes.
-
Functions, parameters, and return values
Create reusable functions with parameters and return values rather than hidden global state.
-
Arrays and common methods
Store ordered values in arrays and use map, filter, and find for common tasks.
-
Objects and properties
Group related facts in objects and read or update their named properties.