JS Built-ins
BigIntbeginner

BigInt β€” typeof literal

πŸ“– Usage Example
const big = BigInt(9007199254740991)
big + 1n  // β†’ 9007199254740992n

BigInt() creates arbitrarily large integers without losing precision.

BigInt Type

BigInt literals are written with an n suffix. typeof 1n returns 'bigint'.

Challenge: Verify that typeof 1n is 'bigint'.

πŸ’‘ Hints (1)
  • β€’ BigInt literals use the `n` suffix.