[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/has [Back]  [Original]

WeakSet.prototype.has() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

WeakSet.prototype.has()

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 ..

has() , WeakSet , true false.

In this article

ws.has(value);

value

. .

Boolean

WeakSet true, false.

has

js
var ws = new WeakSet();
var obj = {};
ws.add(window);

mySet.has(window); //  true
mySet.has(obj); //  false

Specification
ECMAScript 2027 LanguageSpecification
# sec-weakset.prototype.has


Web Proxy Viewer  |  New URL  |  Original Page