JavaScript, Javascript Tips, Javascript Development, Javascript Frameworks, Web Development.
object const iterableObject = { // Array of items items: ['apple', 'banana', 'cherry'], // Custom iterator method [Symbol.iterator]: function() { let index = 0; // Iterator object with next() method return { next: () => { if (index < this.items.length) { // Return current item and move to the next