JavaScript: Map.prototype
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"));
Type
Type of Map.prototype
is Object
.
console.log(typeof Map.prototype === "object");
Parent
Parent of Map.prototype
is Object.prototype
.
console.log(Reflect.getPrototypeOf(Map.prototype) === Object.prototype);
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);
[see the Map Object Tutorial]
Properties
Value Properties
Function Properties
get/set
loop