JavaScript Developer — Hard
Key points
- Custom iterables require a specific method to be defined
- The method should return an iterator object with a next() method
- The next() method should return {value, done} pairs
- This allows for proper iteration over the custom object
Ready to go further?
Related questions
