Codewars - Convert boolean values to strings 'Yes' or 'No'.

PHOTO EMBED

Tue Apr 12 2022 13:25:38 GMT+0000 (Coordinated Universal Time)

Saved by @Luduwanda #javascriptreact

//Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false.

function boolToWord( bool ){
const str = bool === true ? "Yes" : "No"
return str
  }
content_copyCOPY