Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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 time = 60; //time to liftoff
  9. while (time>=0) {
  10.  
  11. switch (time) {
  12. case 50:
  13. console.log('Orbiter transfers from ground to internal power');
  14. break;
  15.  
  16. case 31:
  17. console.log('Ground launch sequencer is go for auto sequence start');
  18. break;
  19.  
  20. case 16:
  21. console.log('Activate launch pad sound suppression system');
  22. break;
  23.  
  24. case 10:
  25. console.log('Activate main engine hydrogen burnoff system');
  26. break;
  27.  
  28. case 6:
  29. console.log('Main engine start');
  30. break;
  31.  
  32. case 0:
  33. console.log('Solid rocket booster ignition and liftoff!');
  34. break;
  35.  
  36. default:
  37. console.log('T-'+time+' seconds');
  38.  
  39. }
  40. time= time-1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement