Boolean in javascript
./code/boolean.js
1/*
2null
3undefined
40
5-0
6NaN
7""
8
9The above 6 values are automatically converted to false.
10
11All other values are converted to true. Even empty array is converted to true
12 */
13
14console.log(true && null); // null
15console.log(true && undefined); // undefined
16console.log([] && true); // true
17console.log([] || false); // []