JS Built-ins
BigIntintermediate

BigInt() β€” throws on non-integer

πŸ“– Usage Example
100n ** 100n  // β†’ a very large integer

BigInt supports all standard arithmetic operators including exponentiation.

BigInt Non-integer Error

BigInt(1.5) throws a RangeError because 1.5 is not an integer.

Challenge: Verify that BigInt(1.5) throws.

πŸ’‘ Hints (1)
  • β€’ BigInt() only accepts integers; fractions cause a RangeError.