Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 9월.
Object.is() 정적 메서드는 두 값이 같은 값인지 결정합니다.
비교할 첫 번째 값.
value2비교할 두 번째 값.
두 인수가 같은 값인지 여부를 나타내는 불리언.
Object.is()는 두 값이 같은 값인지 결정합니다. 다음 중 하나를 만족하면 두 값은 같습니다.
Object.is()는 == 연산자와 같지 않습니다. == 연산자는 같음을 테스트하기 전에 양 쪽(이 같은 형이 아니라면)에 다양한 강제(coercion)를 적용하지만("" == false가 true가 되는 것과 같은 행동을 초래), Object.is는 어느 값도 강제하지 않습니다.
Object.is()는 === 연산자와도 같지 않습니다. Object.is()와 ===의 유일한 차이는 부호 있는 0과 NaN 값들의 처리입니다. === 연산자(및 == 연산자)는 숫자값 -0과 +0을 같게 처리하지만, NaN은 서로 같지 않게 처리합니다.
| ECMAScript® 2027 Language Specification # sec-object.is |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 6월 27일 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.