Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

truty values in javascript

/*
1. the Boolean value false
2. the null type
3. the undefined type
4. the number 0
5. the empty string ""
6. the odd value NaN (stands for "not a number", check out the NaN MDN article)
That's only!
*/
if("") {
    console.log("Truty");
}else
{
    console.log("Falsy"); //Will be excuted
}
 
PREVIOUS NEXT
Tagged: #truty #values #javascript
ADD COMMENT
Topic
Name
4+1 =