Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
has() は WeakMap インスタンスのメソッドで、指定されたキーをもつ要素が WeakMap オブジェクト内に存在するかどうかを示す論理値を返します。
WeakMap オブジェクトに存在するかテストする項目のキーです。オブジェクトのキーは値ではなく参照として比較されます。
指定されたキーをもつ項目が WeakMap オブジェクト内に存在したら true を返します。そうでなければ false を返します。key がオブジェクトでも非登録シンボルでもない場合は常に false を返します。
| ECMAScript® 2027 Language Specification # sec-weakmap.prototype.has |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年1月22日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.