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" ) ); // true

Type

Type of Set.prototype is Object .

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

console.log( Object.prototype.toString.call( Set.prototype ) === "[object Set]" ); // true

Parent

Parent of Set.prototype is Object.prototype .

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

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 ); // true

[see the Set Object Tutorial]

Properties

JavaScript Set Object

∑ JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Set

prototype