Last active
December 21, 2017 10:22
-
-
Save desinas/b613c61d1f1b5cea81e34223e88bad4a to your computer and use it in GitHub Desktop.
Umbrella Quiz (7-11) of Udacity FEWD
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: Umbrella (7-1) | |
*/ | |
var umbrella = { | |
color: "pink", | |
isOpen: true, | |
open: function() { | |
if (umbrella.isOpen === true) { | |
return "The umbrella is already opened!"; | |
} else { | |
umbrella.isOpen = true; | |
return "Julia opens the umbrella!"; | |
} | |
}, | |
close: function() { | |
if (umbrella.isOpen === false) { | |
return "The umbrella is already closed!"; | |
} else { | |
umbrella.isOpen = false; | |
return "Julia closes the umbrella!" | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What Went Well
Feedback: Your answer passed all our tests! Awesome job!