How does `for..of` loop resolve the iterator from an object?
问题 For an object to implement iterable interface it must implement [Symbol.iterator] key that points to a function that returns the iterator . I'm wondering if the for..of loop internally calls this method on an object to get that iterator ? The reason I'm curious is that, for example, Map defines an interface with several iterators (entries, values, keys) and it seems that if not specified explicitly the for..of loop uses the iterator returned by map.entries() call. I've trying searching in the