Glossary Term
Set.prototype.forEach()
The forEach() method of Set instances executes a provided function once for each value in this set, in insertion order.
The forEach() method executes the provided callback once for each value which actually exists in the Set object. It is not invoked for values which have been deleted. However, it is executed for values which are present but have the value undefined.
the element value the element key the Set object being traversed
There are no keys in Set objects, however, so the first two arguments are both values contained in the Set. This is to make it consistent with other forEach() methods for Map and Array.
Syntax example: forEach(callbackFn)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
