[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Errors/Bad_radix [Back]  [Original]

RangeError: radix must be an integer - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

RangeError: radix must be an integer

RangeError: radix must be an integer at least 2 and no greater than 36 (Firefox)
RangeError: toString() radix argument must be between 2 and 36 (Chrome)

In this article

RangeError

?

Number.prototype.toString() radix. , 2 36 , . , ( 10) 169 ( 16) A9.

, 36? , 10, ; , 36, ( ) 26 .

:

js
(42).toString(0);
(42).toString(1);
(42).toString(37);
(42).toString(150);
//       :
(12071989).toString("MM-dd-yyyy");

js
(42).toString(2); // "101010" ( )
(13).toString(8); // "15"     ()
(0x42).toString(10); // "66"     ()
(100000).toString(16); // "186a0"  ()


Web Proxy Viewer  |  New URL  |  Original Page