JavaScript Professional — Hard
Key points
- Each call to `outer()` creates a new closure with its own `count` variable
- The `inner()` function increments the `count` variable each time it is called
- `a()` and `b()` have separate `count` variables due to closures
- The output is determined by the order of function calls
Ready to go further?
Related questions
