#Learn JavaScript part 4 - Conditional statements
Read below for instructions on completing the coding challenge:
This app, mission control, is built to manage the missle defense system of no particular country on no particular planet.
If a missle threat is detected, the guard needs to be able to quickly enter the direction the threat is coming from: North, East, South or West, and the level of the threat.
Each side, for example North, is protected by 12 silos. Silos 1 - 12 are for the North, 13 - 24 for the Easy, 25 - 36 for the South, and 37 - 48 for the West. Each threat level requires 3 silos to be used.
So, if the threat is from the North with a threat level of 1, then
Silos 1 through 3 are activated!
should be displayed on the screen. There is a div with an id of
display for this purpose.
If the threat is from the North with a threat level of 4, then
Silos 1 through 12 are activated!
should be displayed.
If the threat is from the South with a threat level of 3, then
Silos 25 through 33 are activated!
should be displayed.
There are of course many ways to accomplish this, and as this is a beginner javascript course, the main goal here is not to write the best and cleanest code, but to get the job done, and write code that is easy to understand.
The goal of this challenge is to practice what you've learned from Learn JavaScript part 4 on namelesshacker.com. This lesson is about conditional statements: if, if else, else.
Most of the code is set up for you. You'll need to check to see if the variable is North, and if so then you'll need to check if it is threat level 1, level 2, level 3, and so on...
To give you a good idea, the first few lines of the conditional logic have been written for you.
If you have any questions, please ask Seth in the chat on namelesshacker.com.