Hi , my code output a error and I can’t understand what am I doing wrong
//the exercise:
Using the logical operators you just learned, write an expression that represents the following statement:
“I would like an ice cream with strawberry and either chocolate or stracciatella, or an ice cream of any flavour but caramel.”
Declare a variable named iceCream and assign it the logical expression.
//my code:
var chocolate;
var strawberry;
var stracciatella;
var caramel;
var iceCream = strawberry && chocolate || strawberry && stracciatella || chocolate && stracciatella && !caramel;
//output this error:
Output
Code is incorrect
‘any flavour but caramel’ can be written as not caramel