JS Built-ins
BigInttoStringbeginner

BigInt.prototype.toString() β€” binary

πŸ“– Usage Example
0n.toString()  // β†’ '0'

toString() on 0n returns the string '0'.

BigInt toString(2)

(8n).toString(2) converts the BigInt to binary '1000'.

Challenge: Verify binary conversion.

πŸ’‘ Hints (1)
  • β€’ Pass 2 as the radix for binary output.