A Pen by ClaudiaInBytes on CodePen.
Created
August 20, 2017 20:50
-
-
Save claudiainbytes/edc0cd26e7ab8c7e5ed1b8cc135f0456 to your computer and use it in GitHub Desktop.
Ice Cream Quiz
This file contains hidden or 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) | |
* | |
* 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 = "vanilla"; | |
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