Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const bestFruit = 'avocado'
  2. const worstFruit = ''
  3.  
  4. if (bestFruit)  // true
  5. if (worstFruit) // false
  6. if (bestFruit / 2)  // false (NaN)
  7.  
  8. let mango
  9. let watermelon = null
  10.  
  11. if (mango)      // false
  12. if (watermelon) // false
  13.  
  14. const myFruit = {}
  15. const allMyFruits = []
  16.  
  17. if (myFruit)        // true
  18. if (allMyFruits)    // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement