Limitations and Considerations

  • Some operators don’t support mixed types (both operands must be BigInt or neither).
  • Be cautious when coercing between BigInt and regular numbers (precision may be lost).
  • Unsigned right shift (>>>) is not supported for BigInt.

Supported Browsers

The browsers supporting BigInt method are listed below:



JavaScript BigInt

BigInt is a built-in object in JavaScript that provides a way to represent whole numbers larger than 2^53 – 1. The largest number that JavaScript can reliably represent with the Number primitive is 2^53 – 1, which is represented by the MAX_SAFE_INTEGER constant. BigInts are utilized in scenarios where operations on large numbers are necessary due to their ability to represent integers with arbitrary precision.

Syntax:

BigInt( number ) 
or
Appending n to end of an integer literal
  • Parameters: It accepts a single integer literal as a string that needs to be represented as BigInt.
  • Return Type: This method returns the given value as BigInt data type.

Similar Reads

JavaScript BigInt Examples

1. Creating BigInt using BigInt() Function...

Usage Recommendation

The following applications are not recommended to be used with BigInt due to its implementation:...

Limitations and Considerations

Some operators don’t support mixed types (both operands must be BigInt or neither).Be cautious when coercing between BigInt and regular numbers (precision may be lost).Unsigned right shift (>>>) is not supported for BigInt....