and condition in js 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: javascript if and statement
let a = 1;
let b = 2;
if(a == 1 && b ==2){
// Code here
}