JavaScript: Set.prototype

By Xah Lee. Date: . Last updated: .

New in JS2015.

Set.prototype is the value of the property key "prototype" of the function Set. [see Set Object]

console.log( Set.hasOwnProperty ( "prototype" ) );

Type

Type of Set.prototype is Object .

console.log(typeof Set.prototype === "object");

console.log(
  Reflect.apply(Object.prototype.toString, Set.prototype, []) ===
    "[object Set]"
);

Parent

Parent of Set.prototype is Object.prototype .

console.log( Reflect.getPrototypeOf ( Set.prototype ) === Object.prototype );

Purpose

Purpose of Set.prototype is to provide methods and properties useful for all set instances.

Set.prototype is the parent of all set instances.

console.log( Reflect.getPrototypeOf ( new Set() ) === Set.prototype );

[see the Set Object Tutorial]

Properties

JavaScript Set Object

BUY
ΣJS
JavaScript in Depth

JS Obj Reference

Set

prototype