Challenge 1 — Solution Task: Write a generator function* evens(max) that yields every even number from 0 up to max (inclusive). Use for...of to print every value it produces for evens(10). function* evens(max) { for (let i = 0; i <= max; i += 2) { yield i; } } for (const n of evens(10)) { console.log(n); } Expected output: 0 2 4 6 8 10 Notes: - i += 2 in the loop's post clause steps by 2 each time, the same technique used in Go Fundamentals Chapter 4's equivalent even-number challenge, just written here with JavaScript's for loop. - for...of works directly on evens(10) because calling a generator function automatically returns something that already satisfies the iterator protocol — no .next() calls were written explicitly. - evens(10) is finite (the loop condition i <= max guarantees it eventually stops), which is exactly why for...of is safe to use here, unlike with an infinite generator.