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

RangeError: argument is not a valid code point - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

RangeError: argument is not a valid code point

JavaScript "Invalid code point" NaN (-1) (5.4) 0x10FFFF (1114111) String.fromCodePoint()

js
RangeError: {0} is not a valid code point (Firefox)
RangeError: Invalid code point {0} (Chromium)

RangeError

String.fromCodePoint() NaN (-1) (5.4) 0x10FFFF (1114111)

Unicode 0 0x10FFFF

js
String.fromCodePoint("_"); // RangeError
String.fromCodePoint(Infinity); // RangeError
String.fromCodePoint(-1); // RangeError
String.fromCodePoint(3.14); // RangeError
String.fromCodePoint(3e-2); // RangeError
String.fromCodePoint(NaN); // RangeError

js
String.fromCodePoint(42); // "*"
String.fromCodePoint(65, 90); // "AZ"
String.fromCodePoint(0x404); // "\u0404"
String.fromCodePoint(0x2f804); // "\uD87E\uDC04"
String.fromCodePoint(194564); // "\uD87E\uDC04"
String.fromCodePoint(0x1d306, 0x61, 0x1d307); // "\uD834\uDF06a\uD834\uDF07"


Web Proxy Viewer  |  New URL  |  Original Page