--- title: Set.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/Set translation_of: Web/JavaScript/Reference/Global_Objects/Set translation_of_original: Web/JavaScript/Reference/Global_Objects/Set/prototype original_slug: Web/JavaScript/Reference/Global_Objects/Set/prototype ---
The Set.prototype property represents the prototype for the {{jsxref("Set")}} constructor.
{{jsxref("Set")}} instances inherit from {{jsxref("Set.prototype")}}. You can use the constructor's prototype object to add properties or methods to all Set instances.
Set.prototype.constructorSet.Set объект. Возвращает Set объект.Set object.value and returns the value that Set.prototype.has(value) would have previously returned. Set.prototype.has(value) will return false afterwards.Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. This is kept similar to the Map object, so that each entry has the same value for its key and value here.callbackFn once for each value present in the Set object, in insertion order. If a thisArg parameter is provided to forEach, it will be used as the this value for each callback.Set object or not.values() function and returns a new Iterator object that contains the values for each element in the Set object in insertion order.Iterator object that contains the values for each element in the Set object in insertion order.Iterator object that contains the values for each element in the Set object in insertion order.| Specification | Status | Comment |
|---|---|---|
| {{SpecName('ES2015', '#sec-set.prototype', 'Set.prototype')}} | {{Spec2('ES2015')}} | Initial definition. |
| {{SpecName('ESDraft', '#sec-set.prototype', 'Set.prototype')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Set.prototype")}}