PHP has a logical operator &&. The && operator takes two boolean values, and returns true if both values are true.
Consider a && b:
a is checked if it is true or false.a is false, false is returned.b is checked if it is true or false.b is false, false is returned.true is returned (as both a and b are therefore true ).The && operator will only return true for true && true.
Make a function using the && operator.
andCompare(true, false) ➞ false
andCompare(true, true) ➞ true
andCompare(false, true) ➞ false
andCompare(false, false) ➞ falseN/A