Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. /*
  2. * Programming Quiz: Countdown, Liftoff! (4-3)
  3. *
  4. * Using a while loop, print out the countdown output above.
  5. */
  6.  
  7. // your code goes here
  8. var seconds = 60;
  9.  
  10. while ( seconds > -1 ) {
  11. if ( seconds === 50 ) {
  12. console.log("Orbiter transfers from ground to internal power");
  13. } else if ( seconds === 31 ) {
  14. console.log("Ground launch sequencer is go for auto sequence start");
  15. } else if ( seconds === 16 ) {
  16. console.log("Activate launch pad sound suppression system");
  17. } else if ( seconds === 10 ) {
  18. console.log("Activate main engine hydrogen burnoff system");
  19. } else if ( seconds === 6 ) {
  20. console.log("Main engine start");
  21. } else if ( seconds === 0 ) {
  22. console.log("Solid rocket booster ignition and liftoff!");
  23. } else {
  24. console.log("T-" + seconds + " seconds");
  25. }
  26. seconds--;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement