JS Built-ins
BooleantoStringbeginner

Boolean.toString() β€” true gives 'true'

πŸ“– Usage Example
true.toString()   // β†’ 'true'
false.toString()  // β†’ 'false'

toString() converts a boolean to the string 'true' or 'false'.

Boolean.prototype.toString()

true.toString() returns the string 'true'.

Challenge: Verify the result.

πŸ’‘ Hints (1)
  • β€’ Boolean.toString() returns the string representation of the boolean.