title: Udacity question front end nanodegree question-conditionals
body: <p>I would post this in the forum over at Udacity but the classes hasn't formally opened for the new cohort. I was wondering if you could help me with the following question for the quiz I'm taking. These are the directions:</p>
  
  <p>Directions:
  Ice cream is one of the most versatile desserts on the planet because it can be done up so many different ways. Using logical operators, write a series of complex logical expressions that prints only if the following conditions are true:</p>
  
  <p>if flavor is set to vanilla or chocolate and
  if vessel is set to cone or bowl and
  if toppings is set to sprinkles or peanuts
  If the above conditions are true, then print out:</p>
  
  <p>I'd like two scoops of __________ ice cream in a __________ with __________.
  Fill in the blanks with the flavor of the ice cream, vessel, and toppings. For example,</p>
  
  <p>I'd like two scoops of vanilla ice cream in a cone with peanuts.
  TIP: Make sure to test your code with different values. For example,</p>
  
  <p>If flavor equals "chocolate", vessel equals "cone" and toppings equals "sprinkles", then "I'd like two scoops of chocolate ice cream in a cone with sprinkles." should be printed to the console.</p>
  
  <p>and this is my code, which shouldn't print anything to the console:</p>
  
  <pre><code>    var flavor = "strawberry";
  var vessel = "cone";
  var toppings = "cookies";
  
  // Add your code here
  if (flavor === ("vanilla" || "chocolate") &amp;&amp; (vessel === 'cone' || 'bowl') &amp;&amp; toppings === ("sprinkles" || "peanuts")) {
      console.log("I\'d like two scoops of " + flavor + " ice cream in a " + vessel + " with " + toppings + ".");
  }
  </code></pre>
  
  <p>I'm getting this error message:</p>
  
  <p>What Went Well
  - Your code should have a variable flavor
  - Your code should have a variable vessel
  - Your code should have a variable toppings
  - Your code should have an if statement
  - Your code should use logical expressions</p>
  
  <ul>
  <li><p>Your code should work with flavor=vanilla, vessel=cone, and toppings=sprinkles</p></li>
  <li><p>Your code should work with flavor=vanilla, vessel=bowl, and toppings=sprinkles</p></li>
  <li><p>Your code should not log anything when the flavor is something other than "vanilla" or "chocolate"</p></li>
  <li><p>Your code should not log anything when the vessel is something other than "cone" or "bowl"</p></li>
  <li><p>Your code should not log anything when toppings is something other than "sprinkles" or "peanuts"</p></li>
  </ul>
  
  <p>What Went Wrong</p>
  
  <ul>
  <li><p>Your code did not pass when flavor=vanilla, vessel=cone, and toppings=peanuts.</p></li>
  <li><p>Your code did not pass when flavor=vanilla, vessel=bowl, and toppings=peanuts.</p></li>
  <li><p>Your code did not pass when flavor=chocolate, vessel=cone, and toppings=sprinkles.</p></li>
  <li><p>Your code did not pass when flavor=chocolate, vessel=cone, and toppings=peanuts.</p></li>
  <li><p>Your code did not pass when flavor=chocolate, vessel=bowl, and toppings=sprinkles.</p></li>
  <li><p>Your code did not pass when flavor=chocolate, vessel=bowl, and toppings=peanuts.</p></li>
  </ul>
  
  <p>I'm at a loss here and any help would be appreciated. 
  Thanks.</p>