A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Errors/Not_a_valid_code_point below:

RangeError: argument is not a valid code point - JavaScript

RangeError: argument is not a valid code point Message
RangeError: {0} is not a valid code point (Firefox)
RangeError: Invalid code point {0} (Chrome)
Tipo de error ¿Qué estuvo mal?

El metodo String.fromCodePoint() acepta solamente code point validos.

Un code point es un valor en el conjunto de caracteres Unicode; esto es, un rango de enteros que va desde 0 a 0x10FFFF.

Usando valores NaN, enteros negativos (-1), no enteros (3.14), o valores mayores a 0x10FFFF (1114111) no trabajarian con este metodo.

Ejemplos Casos invalidos
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
Casos validos
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"
Observe tambien

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4