Build a Logic Checker App - Step 2

Tell us what’s happening:

I need to create a logic checker app using boolean operators and non empty strings. The console demands to log the boolean “truthyOrFalsy” so that the value returns to true or false.

Your code so far


// User Editable Region

function truthyOrFalsy(true) {
  return Boolean(true);
}

console.log(truthyOrFalsy(true));     // true
console.log(truthyOrFalsy(0));        // false
console.log(truthyOrFalsy("true"));   // true
console.log(truthyOrFalsy(""));       // false
console.log(truthyOrFalsy(null));     // false

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Challenge Information:

Build a Logic Checker App - Step 2

reset the step, you should not create a function

use console.log as asked in the instructions

1 Like