Object.is() Posted on 2022-05-01 Edited on 2023-07-31 In Web , TIL , 2022.05 Object.is()Object.is()는 인자로 받는 두 값이 같은지 확인해서 boolean으로 반환한다 구문123Object.is(value1, value2)// true or false 예제12345678910111213141516Object.is('foo', 'foo'); // trueObject.is(window, window); // trueObject.is('foo', 'bar'); // falseObject.is([], []); // falsevar test = { a: 1 };Object.is(test, test); // trueObject.is(null, null); // true// 특별한 경우Object.is(0, -0); // falseObject.is(-0, -0); // trueObject.is(NaN, 0/0); // true https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Object/is