Ashutosh sarangi
Ashutosh sarangi

Reputation: 164

How Do I get The Same Number In console.log?

let a = 15511210043330985984000000;
console.log(BigInt(a).toString());

How Do I get the Same a value.

Upvotes: 0

Views: 91

Answers (1)

HymnZzy
HymnZzy

Reputation: 2925

You'll need to load as a string for this to work or append n at the end

let a = BigInt('15511210043330985984000000');

or

let a = 15511210043330985984000000n;

Upvotes: 2

Related Questions