Chapter

Loops, functions, and collections

<p>Repeat work deliberately, package behavior into functions, and organize related values.</p>

Lessons

  1. Loops and iteration

    Use for...of and while loops to process values or repeat work until a condition changes.

  2. Functions, parameters, and return values

    Create reusable functions with parameters and return values rather than hidden global state.

  3. Arrays and common methods

    Store ordered values in arrays and use map, filter, and find for common tasks.

  4. Objects and properties

    Group related facts in objects and read or update their named properties.