Why does this return false
?
var flavor = "chocolate";
console.log(flavor == ("vanilla" || "chocolate"));
and if I type instead:
var flavor = "chocolate";
console.log(flavor == ("vanilla" && "chocolate"));
it returns true
. This doesn't make sense to me because logically, flavor cannot equal both chocolate and vanilla. Can someone help me understand how I should be thinking through this?