Advanced
JavaScript
Q71 / 100
What is a BigInt in JavaScript and when would you use it?
Correct! Well done.
Incorrect.
The correct answer is B) An arbitrary-precision integer type (suffix n: 9007199254740993n) used when values exceed Number.MAX_SAFE_INTEGER
B
Correct Answer
An arbitrary-precision integer type (suffix n: 9007199254740993n) used when values exceed Number.MAX_SAFE_INTEGER
Explanation
Number can't represent integers above 2^53-1 accurately. BigInt (42n) supports arbitrary size. BigInt and Number cannot be mixed in arithmetic without explicit conversion.
Progress
71/100