JavaScript: Map.prototype

By Xah Lee. Date: . Last updated: .

New in JS2015.

Map.prototype is the value of the property key "prototype" of the function Map.

[see Map Object]

console.log( Map.hasOwnProperty ( "prototype" ) ); // true

Type

Type of Map.prototype is Object .

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

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

Parent

Parent of Map.prototype is Object.prototype .

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

Purpose

Purpose of Map.prototype object is to provide methods and properties useful for all map instances.

Map.prototype is the parent of all map instances.

console.log( Reflect.getPrototypeOf ( new Map() ) === Map.prototype ); // true

[see the Map Object Tutorial]

Properties

Value Properties

Function Properties

get/set

loop

JavaScript Map Object

∑ JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Map

prototype