Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
When Number() is called as a function (without new), it returns value coerced to a number primitive. Specially, BigInts values are converted to numbers instead of throwing. If value is absent, it becomes 0.
Number() is the only case where a BigInt can be converted to a number without throwing, because it's very explicit.
This page was last modified on Jul 10, 2025 by MDN contributors.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.