JS Built-ins
BigIntasIntNbeginner

BigInt.asIntN() β€” typeof result

πŸ“– Usage Example
BigInt.asIntN(1, 1n)  // β†’ -1n

A 1-bit signed integer can only represent 0 or -1.

BigInt.asIntN() Return Type

typeof BigInt.asIntN(8, 1n) is 'bigint'.

Challenge: Verify the return type.

πŸ’‘ Hints (1)
  • β€’ asIntN always returns a bigint.