blob: 3b1c4bc07756421b9c33bed935ff71c597dabb93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
---
title: BigInt.prototype.valueOf()
slug: Web/JavaScript/Reference/Global_Objects/BigInt/valueOf
tags:
- BigInt
- JavaScript
- Metodă
- Prototype
- valueOf()
translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/valueOf
original_slug: Web/JavaScript/Referencje/Obiekty/BigInt/valueOf
---
<div>{{JSRef}}</div>
<p>Metoda <strong><code>valueOf()</code></strong> zwraca opakowaną wartość prymitywną obiektu {{jsxref("BigInt")}}.</p>
<div>{{EmbedInteractiveExample("pages/js/bigint-valueof.html","shorter")}}</div>
<h2 id="Składnia">Składnia</h2>
<pre class="syntaxbox"><var>bigIntObj</var>.valueOf()</pre>
<h3 id="Zwracana_wartość">Zwracana wartość</h3>
<p>BigInt reprezentujący wartość prymitywną danego obiektu {{jsxref("BigInt")}}.</p>
<h2 id="Przykłady">Przykłady</h2>
<h3 id="Użycie_valueOf">Użycie <code>valueOf</code></h3>
<pre class="brush: js">typeof Object(1n); // object
typeof Object(1n).valueOf(); // bigint
</pre>
<h2 id="Specyfikacje">Specyfikacje</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specyfikacja</th>
</tr>
<tr>
<td>{{SpecName('ESDraft', '#sec-bigint.prototype.valueof', 'BigInt.prototype.valueOf()')}}</td>
</tr>
</tbody>
</table>
<h2 id="Wsparcie_przeglądarek">Wsparcie przeglądarek</h2>
<p>{{Compat("javascript.builtins.BigInt.valueOf")}}</p>
<h2 id="Zobacz_też">Zobacz też</h2>
<ul>
<li>{{jsxref("BigInt.prototype.toString()")}}</li>
</ul>
|