The valueOf()
method returns the wrapped primitive value of a BigInt
object.
bigIntObj.valueOf()
A BigInt representing the primitive value of the specified BigInt
object.
valueOf
typeof Object(1n); // object typeof Object(1n).valueOf(); // bigint
Specification |
---|
ECMAScript (ECMA-262) The definition of 'BigInt.prototype.valueOf()' in that specification. |
Desktop | ||||||
---|---|---|---|---|---|---|
valueOf |
67 | 79 | 68 | No | 54 | 14 |
Mobile | ||||||
---|---|---|---|---|---|---|
valueOf |
67 | 67 | 68 | 48 | 14 | 9.0 |
Server | |
---|---|
valueOf |
10.4.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt/valueOf