Map.prototype.has()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Map
实例的 has()
方法返回一个布尔值,指示此映射中是否存在具有指定键的元素。
¥The has()
method of Map
instances returns a boolean indicating whether an element with the
specified key exists in this map or not.
Try it
语法
参数
返回值
示例
使用 has()
规范
Specification |
---|
ECMAScript Language Specification # sec-map.prototype.has |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also