title: Return boolean true or false in a JavaScript function
body: <p>I am unable to get my function to return the statement provided when the Boolean value is false.</p>
  
  <p>Tried adding Boolean() to the code, tried making every possible outcome look like</p>
  
  <p>singleArg "0" || singleArg "something" etc</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function isTruthy(singleArg) {
    let isitTrue = '';
    if (singleArg === 'somecontent' || 1 || [2, 3, 4], {
        name: 'Alex'
      }) {
      isitTrue = true;
    } else if (singleArg === false || null || undefined || 0 || "") {
      isitTrue === 'The boolean value false is falsey';
      isitTrue === 'The null value is falsey';
      isitTrue === 'undefined is falsey';
      isitTrue === 'The number 0 is falsey';
      isitTrue == 'The empty string is falsey (the only falsey string)';
    }
    return isitTrue;
  }
  
  console.log(isTruthy(('somecontent')));</code></pre>
  </div>
  </div>
  </p>
  
  <p>Write a function <code>isTruthy</code> that accepts a single argument of any type.</p>
  
  <p><code>isTruthy</code> should return true if that argument is 'truthy'.</p>
  
  <p>If the value is 'falsey', log out one of the messages below, corresponding to
  the type of the value tested.</p>