/..

Dark Mode

Enable Console

The Function

boolToWord()
boolToWord(bool)

/*
  Returns value of a boolean using a string, like 'Yes' or 'No'
*/

boolToWord(true); 
// 'Yes'

boolToWord(false); 
// 'No'

Solution by - Need4Swede

How it works

function boolToWord(bool){

  // If bool is true, return 'Yes', else return 'No'
  return bool ? 'Yes' : 'No';
}

Try it yourself - Codewars Source

You can also use my built-in JavaScript console