Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
Array.prototype[Symbol.iterator]()
TypedArray.prototype[Symbol.iterator]()
String.prototype[Symbol.iterator]()
Map.prototype[Symbol.iterator]()
Set.prototype[Symbol.iterator]()
Whenever an object needs to be iterated (such as at the beginning of a for...of loop), its [Symbol.iterator]() method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.
Or iterables can be defined directly inside a class or object using a computed property:
Segments.prototype[Symbol.iterator]()
This page was last modified on Oct 30, 2025 by MDN contributors.