Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
JavaScript 예외 "radix must be an integer at least 2 and no greater than 36"는 Number.prototype.toString() 또는 BigInt.prototype.toString() 메서드의 선택적 매개 변수가 지정된 경우 2에서 36 사이여야 합니다.
Number.prototype.toString() 또는 BigInt.prototype.toString() 메서드는 선택적 파라미터인 radix(기수: 진수를 지정하는 값)와 함게 사용되어 왔습니다. 이 파라미터는 반드시 수의 값을 나타내는 진법 2와 36 사이로 지정된 정수(숫자)여야 합니다.
이 매개 변수의 값이 36으로 제한된 이유는 무엇일까요? 10보다 큰 기수는 알파벳 문자를 숫자로 사용하기 때문입니다. 따라서 기수는 36을 초과할 수 없습니다. 라틴 알파벳(영어와 다른 많은 언어에서 사용됨)은 26자뿐이기 때문입니다.
보통 아래의 radix 중 하나를 사용하게 될 것입니다.
This page was last modified on 2023년 8월 8일 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.