diff options
Diffstat (limited to 'files/de/web/javascript/reference/global_objects/number/parseint/index.html')
| -rw-r--r-- | files/de/web/javascript/reference/global_objects/number/parseint/index.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/files/de/web/javascript/reference/global_objects/number/parseint/index.html b/files/de/web/javascript/reference/global_objects/number/parseint/index.html new file mode 100644 index 0000000000..e9efe16f11 --- /dev/null +++ b/files/de/web/javascript/reference/global_objects/number/parseint/index.html @@ -0,0 +1,77 @@ +--- +title: Number.parseInt() +slug: Web/JavaScript/Reference/Global_Objects/Number/parseInt +tags: + - ECMAScript 2015 + - JavaScript + - Method + - Number +translation_of: Web/JavaScript/Reference/Global_Objects/Number/parseInt +--- +<div>{{JSRef}}</div> + +<p>Die <strong><code>Number.parseInt()</code></strong> Methode liest ein String-Argument ein und gibt eine ganze Zahl im angegebenen Zahlensystem zurück.</p> + +<div>{{EmbedInteractiveExample("pages/js/number-parseint.html")}}</div> + + + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox">Number.parseInt(<var>string</var>[, <var>radix</var>])</pre> + +<h3 id="Parameter">Parameter</h3> + +<div>{{page("de/docs/Web/JavaScript/Reference/Global_Objects/parseInt", "Parameter")}}</div> + +<h3 id="Rückgabewert">Rückgabewert</h3> + +<p>{{page("de/docs/Web/JavaScript/Reference/Global_Objects/parseInt", "Rückgabewert")}}</p> + +<h2 id="Beschreibung">Beschreibung</h2> + +<p>Diese Methode hat den gleichen Funktionsumfang wie die globalen {{jsxref("parseInt", "parseInt()")}} Funktion:</p> + +<pre class="brush: js">Number.parseInt === parseInt; // true</pre> + +<p>Sie ist Teil von ECMAScript 2015 und hat als Ziel die Modularisierung von globalen Funktionen. Mehr Details und Beispiele im Artikel {{jsxref("parseInt", "parseInt()")}}.</p> + +<h2 id="Polyfill">Polyfill</h2> + +<pre class="brush: js">if (Number.parseInt === undefined) + Number.parseInt = window.parseInt;</pre> + +<h2 id="Spezifikationen">Spezifikationen</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Spezifikation</th> + <th scope="col">Status</th> + <th scope="col">Komment</th> + </tr> + <tr> + <td>{{SpecName('ES6', '#sec-number.parseint', 'Number.parseInt')}}</td> + <td>{{Spec2('ES6')}}</td> + <td>Initiale Definition.</td> + </tr> + <tr> + <td>{{SpecName('ESDraft', '#sec-number.parseint', 'Number.parseInt')}}</td> + <td>{{Spec2('ESDraft')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="Browserkompatibilität">Browserkompatibilität</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("javascript.builtins.Number.parseInt")}}</p> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<ul> + <li>{{jsxref("Number")}}</li> + <li>{{jsxref("parseInt", "parseInt()")}}</li> +</ul> |
