JS Built-ins
BigIntbeginner

BigInt β€” arithmetic

πŸ“– Usage Example
BigInt('123456789012345678901234567890')  // β†’ 123456789012345678901234567890n

Pass a string to BigInt() to create very large integers from text.

BigInt Arithmetic

BigInts support arithmetic: 1n + 2n === 3n.

Challenge: Verify this addition.

πŸ’‘ Hints (1)
  • β€’ BigInt arithmetic always stays in BigInt β€” no decimals.