JS Built-ins
BigIntasUintNbeginner

BigInt.asUintN() β€” max unsigned 8-bit

πŸ“– Usage Example
BigInt.asUintN(8, 255n)  // β†’ 255n

If the value fits in N bits unsigned, it is returned unchanged.

BigInt.asUintN() Max Value

BigInt.asUintN(8, 255n) returns 255n, the maximum unsigned 8-bit value.

Challenge: Verify no wrap occurs at max.

πŸ’‘ Hints (1)
  • β€’ 255 is the maximum 8-bit unsigned value; no wrapping.