-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCountdown, Liftoff! (4-3)
More file actions
33 lines (31 loc) · 881 Bytes
/
Countdown, Liftoff! (4-3)
File metadata and controls
33 lines (31 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Programming Quiz: Countdown, Liftoff! (4-3)
*
* Using a while loop, print out the countdown output above.
*/
// your code goes here
var T = 60;
while (T>=0){
if(T===50){
console.log("Orbiter transfers from ground to internal power (T-50 seconds)") ;
}
else if(T===31){
console.log("Ground launch sequencer is go for auto sequence start (T-31 seconds)");
}
else if(T===16){
console.log("Activate launch pad sound suppression system (T-16 seconds)");
}
else if(T===10){
console.log("Activate main engine hydrogen burnoff system (T-10 seconds)");
}
else if(T===6){
console.log("Main engine start (T-6 seconds)");
}
else if(T===0){
console.log("Solid rocket booster ignition and liftoff! (T-0 seconds)");
}
else{
console.log("T-"+T+" seconds");
}
T = T-1;
}