JS Built-ins
BigInttoStringbeginner

BigInt.prototype.toString() β€” returns string type

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

toString() preserves the negative sign for negative BigInt values.

BigInt toString() Type

typeof (42n).toString() is 'string'.

Challenge: Verify the return type.

πŸ’‘ Hints (1)
  • β€’ toString() always returns a string.