From 310fd066e91f454b990372ffa30e803cc8120975 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:56:40 +0100 Subject: unslug zh-cn: move --- .../global_objects/map/prototype/index.html | 131 --------------------- 1 file changed, 131 deletions(-) delete mode 100644 files/zh-cn/web/javascript/reference/global_objects/map/prototype/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/map') diff --git a/files/zh-cn/web/javascript/reference/global_objects/map/prototype/index.html b/files/zh-cn/web/javascript/reference/global_objects/map/prototype/index.html deleted file mode 100644 index d98bdfac5a..0000000000 --- a/files/zh-cn/web/javascript/reference/global_objects/map/prototype/index.html +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: Map.prototype -slug: Web/JavaScript/Reference/Global_Objects/Map/prototype -translation_of: Web/JavaScript/Reference/Global_Objects/Map -translation_of_original: Web/JavaScript/Reference/Global_Objects/Map/prototype ---- -
{{JSRef}}
- -

Map.prototype 属性表示 {{jsxref("Map")}}构造函数的原型对象。

- -
{{js_property_attributes(0,0,0)}}
- -

描述

- -

{{jsxref("Map")}} 实例继承自{{jsxref("Map.prototype")}}。你可以使用这个构造函数的原型对象来给所有的Map实例添加属性或者方法。

- -

属性

- -
-
Map.prototype.constructor
-
返回一个函数,它创建了实例的原型。默认是{{jsxref("Map")}}函数。
-
{{jsxref("Map.prototype.size")}}
-
返回Map对象的键/值对的数量。
-
- -

方法

- -
-
{{jsxref("Map.prototype.clear()")}}
-
移除Map对象的所有键/值对 。
-
{{jsxref("Map.delete", "Map.prototype.delete(key)")}}
-
如果 Map 对象中存在该元素,则移除它并返回 true;否则如果该元素不存在则返回 false。随后调用 Map.prototype.has(key) 将返回 false
-
{{jsxref("Map.prototype.entries()")}}
-
返回一个新的 Iterator 对象,它按插入顺序包含了Map对象中每个元素的 [key, value] 数组
-
{{jsxref("Map.forEach", "Map.prototype.forEach(callbackFn[, thisArg])")}}
-
按插入顺序,为 Map对象里的每一键值对调用一次callbackFn函数。如果为forEach提供了thisArg,它将在每次回调中作为this值。
-
{{jsxref("Map.get", "Map.prototype.get(key)")}}
-
返回键对应的值,如果不存在,则返回undefined。
-
{{jsxref("Map.has", "Map.prototype.has(key)")}}
-
返回一个布尔值,表示Map实例是否包含键对应的值。
-
{{jsxref("Map.prototype.keys()")}}
-
返回一个新的 Iterator对象, 它按插入顺序包含了Map对象中每个元素的
-
{{jsxref("Map.set", "Map.prototype.set(key, value)")}}
-
设置Map对象中键的值。返回该Map对象。
-
{{jsxref("Map.prototype.values()")}}
-
返回一个新的Iterator对象,它按插入顺序包含了Map对象中每个元素的
-
{{jsxref("Map.@@iterator", "Map.prototype[@@iterator]()")}}
-
返回一个新的Iterator对象,它按插入顺序包含了Map对象中每个元素的 [key, value] 数组
-
- -

规范

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('ES6', '#sec-map.prototype', 'Map.prototype')}}{{Spec2('ES6')}}Initial definition.
{{SpecName('ESDraft', '#sec-map.prototype', 'Map.prototype')}}{{Spec2('ESDraft')}}
- -

浏览器兼容性

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support38{{ CompatGeckoDesktop("13") }}11257.1
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatNo}}38{{CompatGeckoMobile("13")}}{{CompatNo}}{{CompatNo}} -

8

-
-
- -

相关链接

- - -- cgit v1.2.3-54-g00ecf