From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../global_objects/bigint/valueof/index.html | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 files/zh-cn/web/javascript/reference/global_objects/bigint/valueof/index.html (limited to 'files/zh-cn/web/javascript/reference/global_objects/bigint/valueof') diff --git a/files/zh-cn/web/javascript/reference/global_objects/bigint/valueof/index.html b/files/zh-cn/web/javascript/reference/global_objects/bigint/valueof/index.html new file mode 100644 index 0000000000..0487cfbef3 --- /dev/null +++ b/files/zh-cn/web/javascript/reference/global_objects/bigint/valueof/index.html @@ -0,0 +1,55 @@ +--- +title: BigInt.prototype.valueOf() +slug: Web/JavaScript/Reference/Global_Objects/BigInt/valueOf +translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/valueOf +--- +
{{JSRef}}
+ +

valueOf() 方法返回 {{jsxref("BigInt")}} 对象包装的原始值。

+ +
{{EmbedInteractiveExample("pages/js/bigint-valueof.html")}}
+ + + +

语法

+ +
bigIntObj.valueOf()
+ +

返回值

+ +

表示指定 {{jsxref("BigInt")}} 对象的原始 BigInt 值。

+ +

例子

+ +

Using valueOf

+ +
typeof Object(1n); // object
+typeof Object(1n).valueOf(); // bigint
+
+ +

标准

+ + + + + + + + + + + + +
SpecificationStatus
{{SpecName('ESDraft', '#sec-bigint.prototype.valueof', 'BigInt.prototype.valueOf()')}}{{Spec2('ESDraft')}}
+ +

浏览器支持

+ + + +

{{Compat("javascript.builtins.BigInt.valueOf")}}

+ +

请参阅

+ + -- cgit v1.2.3-54-g00ecf