JS Coding Questions Logo
JS Coding Questions
#235💼 Interview

What is an Iterator

Advertisement

728x90

An iterator is an object which defines a sequence and a return value upon its termination. It implements the Iterator protocol with a next() method which returns an object with two properties: value (the next value in the sequence) and done (which is true if the last value in the sequence has been consumed).

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 64

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
235of476