js and and or code example
Example 1: javascript and
var hungry=true;
var slow=true;
var anxious=true;
//&& means and
if(hungry && slow && anxious){
var cause="weed";
}
Example 2: js ===
5 =='5' // true: ignores type
5 === '5' // false: includes type
Example 3: and operator in javascript
//&& returns true if both values are true
//or returns the second argument if the first is true
var a = true
var b = ""
var c = 1
true && "" //""
"" && 1 //""
false && 5 //false