/*js Non-Boolean operation logic and logic or */
/*
* Note: ("", 0, undefined, NaN, null converted to false)
* */
/* Logic and */
Console.log ((1 && 1 && "Hello" && 2 && 3 && 4));//First conversion to True returns last A value (4)
Console.log ((0 && 0 && "Hello" && 2 && 3 && 4));//First conversion to False returns the first value (0)
Console.log ((1 && 2 && 3 && null && nan));//The action value has a null NaN undefined one of them returns this value (with more than one of the top) Returns null
/* Logic or */
Console.log ((1 | | | 1 | | "Hello" | | 2 | | 3 | | 4)); First conversion to true returns the first value (1)
Console.log ((0 | | | 0 | | "Hello" | | 2 | | 3 | | 4)); The first conversion to false returns the first value converted to True (hello)
Console.log ((0 | | | 0 | | "" || Undefined | | NaN | | NULL)); Convert all to False returns the last (null)
JS Non-Boolean operation logic and logic or *