A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt/valueOf below:

BigInt.prototype.valueOf() - JavaScript | MDN

MDN Web Docs
  1. 面向开发者的 Web 技术
  2. JavaScript
  3. JavaScript 参考
  4. JavaScript 标准内置对象
  5. BigInt
  6. BigInt.prototype.valueOf()

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

Filter sidebar

在本文中
  1. JavaScript 标准内置对象
  2. BigInt
  3. 构造函数
    1. BigInt() constructor
  4. 静态方法
    1. BigInt.asIntN()
    2. BigInt.asUintN()
  5. 实例方法
    1. BigInt.prototype.toLocaleString()
    2. BigInt.prototype.toString()
    3. BigInt.prototype.valueOf()
  6. 继承
  7. Object/Function
  8. 静态方法
    1. Function.prototype.apply()
    2. Function.prototype.bind()
    3. Function.prototype.call()
    4. Function.prototype.toString()
    5. Function.prototype[Symbol.hasInstance]()
  9. 静态属性
    1. Function.displayName 非标准
    2. Function:length
    3. Function.name
    4. Function.prototype.prototype
    5. Function.prototype.arguments 非标准 已弃用
    6. Function.prototype.caller 非标准 已弃用
  10. 实例方法
    1. Object.prototype.__defineGetter__() 已弃用
    2. Object.prototype.__defineSetter__() 已弃用
    3. Object.prototype.__lookupGetter__() 已弃用
    4. Object.prototype.__lookupSetter__() 已弃用
    5. Object.prototype.hasOwnProperty()
    6. Object.prototype.isPrototypeOf()
    7. Object.prototype.propertyIsEnumerable()
    8. Object.prototype.toLocaleString()
    9. Object.prototype.toString()
    10. Object.prototype.valueOf()
  11. 实例属性
    1. Object.prototype.__proto__ 已弃用
    2. Object.prototype.constructor
在本文中 BigInt.prototype.valueOf()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2020.

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

尝试一下
console.log(typeof Object(1n));
// Expected output: "object"

console.log(typeof Object(1n).valueOf());
// Expected output: "bigint"
语法
bigIntObj.valueOf()
返回值

表示指定 BigInt 对象的原始 BigInt 值。

示例 Using valueOf

js

typeof Object(1n); // object
typeof Object(1n).valueOf(); // bigint
规范 Specification ECMAScript® 2026 Language Specification
# sec-bigint.prototype.valueof
浏览器兼容性 请参阅 Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on 2025年2月12日 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4