Iteration Protocols in JavaScript

Medium
2
23.6% Acceptance

In this lab, you will be implementing iteration protocols in JavaScript. Iteration protocols allow you to create custom iterators for your objects. You will create an iterator object using Symbol.iterator that generates even numbers one by one when next() method is called. Additionally, you will create a generator function that achieves the same functionality as the iterator object.

Make sure to implement and test the hasNext() method for the iterator object to check if there are more values to be returned in a given range.