Iterables in JavaScript

Medium
2
31.3% Acceptance

In this lab, you'll create a custom Iterable object in JavaScript and learn to use the for...of loop to iterate through it. You will create a custom iterable object named customIterable with start and end properties. Then, you will implement the [Symbol.iterator] method in the object, which will have a built-in iterator. Finally, you will use the for...of loop to iterate through the objects and store the sum in another variable named sum. After completing this lab, you should have a better understanding of creating custom iterables and how they work.