Created
December 23, 2017 17:44
-
-
Save thevetdoctor/6fda94a64035caf0cb2db832155041e6 to your computer and use it in GitHub Desktop.
iceCreamQuiz_udacity_alc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Programming Quiz: Ice Cream (3-6) | |
* @animalworldng_alc_web_beginners_team_79 | |
* 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" | |
* | |
* We're only testing the if statement and your boolean operators. | |
* It's okay if the output string doesn't match exactly. | |
*/ | |
// change the values of `flavor`, `vessel`, and `toppings` to test your code | |
// var flavor = "strawberry"; | |
var flavor = "chocolate"; | |
var vessel = "cone"; | |
var toppings = "sprinkles"; | |
// 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 +"."); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment