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월.
Number.isSafeInteger() 메서드는 전달된 값이 안전한 정숫값인지 확인합니다.
안전한 정숫값이란 다음과 같습니다.
예를 들어, 2^53 - 1은 안전한 정수입니다. 이 정수는 정확히 표현될 수 있으며, IEEE-754 반올림 모드에서 다른 정숫값이 이 값을 반올림하지 않습니다. 반면에, 2^53 는 안전하지 않은 정수입니다. 이 정수는 정확히 IEEE-754로 표현될 수 있지만, 정수 2^53 + 1은 IEEE-754로 직접 표현될 수 없으며 가까운 수로 반올림하는 것과 0으로 반올림하는 것으로 2^53을 반올림합니다.
안전한 정숫값은 -(2^53 - 1) 부터 2^53 - 1 사이의 모든 정수값으로 구성됩니다.
안전한 정수인지 확인할 값.
주어진 값이 안전한 정숫값인지 나타내는 Boolean.
| ECMAScript® 2027 Language Specification # sec-number.issafeinteger |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 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.