Last active
June 5, 2018 09:09
-
-
Save desinas/21d44be851d49f5cb9c29acf2717a9a6 to your computer and use it in GitHub Desktop.
Countdown Liftoff quiz of Udacity Front end dev
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: Countdown, Liftoff! (4-3) | |
| * | |
| * Using a while loop, print out the countdown output above. | |
| */ | |
| // your code goes here | |
| timeInSeconds =60; | |
| while (timeInSeconds >= 0) { | |
| if (timeInSeconds === 50) { | |
| console.log("Orbiter transfers from ground to internal power") | |
| } | |
| else if (timeInSeconds === 31) { | |
| console.log("Ground launch sequencer is go for auto sequence start") | |
| } | |
| else if (timeInSeconds === 16) { | |
| console.log("Activate launch pad sound suppression system") | |
| } | |
| else if (timeInSeconds === 10) { | |
| console.log("Activate main engine hydrogen burnoff system") | |
| } | |
| else if (timeInSeconds === 6) { | |
| console.log("Main engine start") | |
| } | |
| else if (timeInSeconds === 0) { | |
| console.log("Solid rocket booster ignition and liftoff!") | |
| } | |
| else console.log("T-" + timeInSeconds + " seconds"); | |
| timeInSeconds -=1; | |
| } |
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!