I am learning logical operators and I have a problem with this code. It works perfectly in variables vessel and flavor. But when it comes to toppings my code shows every string apart from if statement. Why is it happening and how can i fix it?
/*
* Programming Quiz: Ice Cream (3-6)
*
* Write a single if statement that logs out the message:
*
* "I'd like two scoops of __________ ice cream in a __________ with __________."
*
* ...only if:
* - flavor is "vanilla" or "chocolate"
* - vessel is "cone" or "bowl"
* - toppings is "sprinkles" or "peanuts"
*/
// change the values of `flavor`, `vessel`, and `toppings` to test your code
var flavor = "chocolate";
var vessel = "cone";
var toppings = "walnuts";
// Add your code here
if (flavor === "vanilla" ||
flavor === "chocolate" && vessel === "cone" ||
vessel === "bowl" && toppings === "sprinkles" ||
toppings === "peanuts"){
console.log("I'd like two scoops of " + flavor +
" ice cream in a " + vessel +
" with " + toppings + ".");
}