Challenge 2 — Solution Task: Write a generator function* fibonacci() that yields an infinite sequence of Fibonacci numbers (1, 1, 2, 3, 5, 8, ...), starting from two seed values. Manually call .next().value six times on an instance and log each result, WITHOUT using for...of (since it's infinite). function* fibonacci() { let a = 1; let b = 1; while (true) { yield a; [a, b] = [b, a + b]; } } const fib = fibonacci(); console.log(fib.next().value); console.log(fib.next().value); console.log(fib.next().value); console.log(fib.next().value); console.log(fib.next().value); console.log(fib.next().value); Expected output: 1 1 2 3 5 8 Notes: - [a, b] = [b, a + b] uses array destructuring (Intermediate Chapter 1) to update both variables in one step — without it, updating a first would change the value used to calculate the new b, giving the wrong sequence. - while (true) makes this generator infinite, exactly like Fundamentals Chapter 4's "Shape 3" infinite for loop — yield is what makes this safe, since nothing inside the loop runs further until .next() is called again. - for...of was deliberately avoided here, since it would call .next() forever and never stop on an infinite generator like this.