A

Admin • 828.03K Points
Coach

Q. Which method of the iterable object returns an iterator object for the collection?

  • (A) iterator()
  • (B) _iterator_()
  • (C) _iteration_()
  • (D) _return_iterator_()
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
An iterable object represents a collection of values that can be iterated. An iterable object must define a method named __iterator__() (with two underscores at the start and end of the name) which returns an iterator object for the collection.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.