diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:38 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:38 +0100 |
commit | 4ab365b110f2f1f2b736326b7059244a32115089 (patch) | |
tree | c3c7c0219f728ade49a78c238c51cc0c8d06ebd6 /files/de/web/javascript/reference/errors/not_a_codepoint | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-4ab365b110f2f1f2b736326b7059244a32115089.tar.gz translated-content-4ab365b110f2f1f2b736326b7059244a32115089.tar.bz2 translated-content-4ab365b110f2f1f2b736326b7059244a32115089.zip |
unslug de: move
Diffstat (limited to 'files/de/web/javascript/reference/errors/not_a_codepoint')
-rw-r--r-- | files/de/web/javascript/reference/errors/not_a_codepoint/index.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/errors/not_a_codepoint/index.html b/files/de/web/javascript/reference/errors/not_a_codepoint/index.html new file mode 100644 index 0000000000..8d72c3be4b --- /dev/null +++ b/files/de/web/javascript/reference/errors/not_a_codepoint/index.html @@ -0,0 +1,55 @@ +--- +title: 'RangeError: argument is not a valid code point' +slug: Web/JavaScript/Reference/Fehler/Not_a_codepoint +tags: + - Errors + - JavaScript + - RangeError +translation_of: Web/JavaScript/Reference/Errors/Not_a_codepoint +--- +<div>{{jsSidebar("Errors")}}</div> + +<h2 id="Fehlermeldung">Fehlermeldung</h2> + +<pre class="syntaxbox">RangeError: {0} is not a valid code point (Firefox) +RangeError: Invalid code point {0} (Chrome) +</pre> + +<h2 id="Fehlertyp">Fehlertyp</h2> + +<p>{{jsxref("RangeError")}}</p> + +<h2 id="Was_ist_falsch_gelaufen">Was ist falsch gelaufen?</h2> + +<p>Die {{jsxref("String.fromCodePoint()")}} Methode erwartet gültige Codepoint.</p> + +<p>Ein <a href="https://de.wikipedia.org/wiki/Codepoint">Codepoint</a> ist ein Wert im Unicode Coderaum, der als Integer im Wertebereich zwischen <code>0</code> und <code>0x10FFFF liegt</code>.</p> + +<p>Die Verwendung von {{jsxref("NaN")}} , negativen Integern (<code>-1</code>), nicht Integern (<code>3.14</code>) und Werten die größer als <code>0x10FFFF</code> (<code>1114111</code>) sind, werden einen Fehler bei dieser Methode produzieren.</p> + +<h2 id="Beispiele">Beispiele</h2> + +<h3 id="Ungültige_Fälle">Ungültige Fälle</h3> + +<pre class="brush: js example-bad">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</pre> + +<h3 id="Gültige_Fälle">Gültige Fälle</h3> + +<pre class="brush: js example-good">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" +</pre> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<ul> + <li>{{jsxref("String.fromCodePoint()")}}</li> +</ul> |