Created
October 11, 2022 14:11
-
-
Save HarcourtHamsa/271cd1058a424a8ad35ea5d6ca7e39cd to your computer and use it in GitHub Desktop.
Class assignment
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
/** | |
* You’ve been asked by the local movie theater managers to implement some JavaScript for a new automated system they’re building. | |
* | |
* | |
* They want to be able to work out whether someone is allowed into a PG-13 movie or not. | |
* | |
* The rules are, if someone is 13 or over, they’re allowed in. If they’re not over 13, but they are accompanied by an adult, they’re also allowed in. | |
* Otherwise, they can’t see the movie. | |
* | |
* var age = 12; | |
* var accompanied = true; | |
* ??? | |
* | |
* Finish this example using the age and accompanied variables to work out whether this 12-year-old is allowed to see the movie. | |
* | |
* Try changing the values (for example, set age to 13 and accompanied to false) and see if your code still works out the right answer. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment