Truthy and Falsy js

JavaScript
//Checking truthy and falsy value

function truthyOrFalsy (val) { 
    if(val) {
      return true
    } else {
      return false
    }
}

console.log(truthyOrFalsy(0)) // print false
console.log(truthyOrFalsy(5)) // print true
Source

Also in JavaScript: