• Returns a string value from the boolean value

    Parameters

    • Optionalvalue: boolean

      the boolean value to check

    • Optionaltruthy: string

      the string to represent true

    • Optionalfalsy: string

      the string to represent false

    • Optionalnil: string

      the string to represent undefined or null

    Returns string | undefined

    a string value from the boolean value

    toString(undefined, 'true', 'false');    // 'true'