Constructeur BigInt()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since septembre 2020.
Le constructeur BigInt()
renvoie une valeur de type bigint
(grand entier).
Syntaxe
js
BigInt(valeur);
Paramètres
valeur
-
La valeur numérique de l'objet à créer. Il peut s'agir d'une chaîne de caractères ou d'un entier.
Note : BigInt()
ne s'utilise pas avec l'opérateur new
.
Exemples
>Créer un nouveau grand entier
js
BigInt(123);
// 123n
Spécifications
Specification |
---|
ECMAScript® 2026 Language Specification> # sec-bigint-constructor> |
Compatibilité des navigateurs
Loading…