The Symbol.iterator static data property represents the well-known symbolSymbol.iterator. The iterable protocol looks up this symbol for the method that returns the iterator for an object. In order for an object to be iterable, it must have an [Symbol.iterator] key. — Mdn docs
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.
Some built-in types have a default iteration behavior, while other types (such as Object) do not. Some built-in types with a [Symbol.iterator]() method are:
and this introspect_methods is called in init function as shown below:
#init() { var proto = RippleArray.prototype; var array_proto = Array.prototype; for (const method of introspect_methods) { proto[method] = function (...v) { this.$length; get_all_elements(this); return array_proto[method].apply(this, v); }; }}