An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
March 23, 2022 05:58 pm GMT
Original Link: https://dev.to/hardikmirg/truthy-falsy-values-in-javascript-1i20
Truthy - Falsy Values in JavaScript
Truthy and Falsy Values
Anything in JavaScript is either True or False.
There are different values to denote whether something is True or False.
Falsy Values
- false
- 0
- null
- Undefined
- NaN
- Empty String
Truthy Values
- Anything that isn't Falsy.
- Empty arrays and objects are Truthy.
Hope you learned something useful today! Peace Out
Original Link: https://dev.to/hardikmirg/truthy-falsy-values-in-javascript-1i20
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To