File tree Expand file tree Collapse file tree
booleans-and-conditionals/exercises Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Declare and initialize the variables for exercise 1 here:
22
3+ let engineIndicatorLight = "red blinking"
4+ let spaceSuitsOn = true
5+ let shuttleCabinReady = true
6+ let crewStatus = spaceSuitsOn && shuttleCabinReady
7+ let computerStatusCode = 200
8+ let shuttleSpeed = 15000
9+
310// BEFORE running the code, predict what will be printed to the console by the following statements:
411
512if ( engineIndicatorLight === "green" ) {
@@ -9,3 +16,21 @@ if (engineIndicatorLight === "green") {
916} else {
1017 console . log ( "engines are off" ) ;
1118}
19+
20+ if ( crewStatus === true ) {
21+ console . log ( "crew ready" )
22+ } else { console . log ( "crew not ready" ) }
23+
24+ if ( computerStatusCode === 200 ) {
25+ console . log ( "Please stand by. Computer is rebooting." ) }
26+ else if ( computerStatusCode === 400 ) {
27+ console . log ( "Success! Computer online." ) }
28+ else ( "ALERT: Computer Offline!" )
29+
30+ console . log ( shuttleSpeed )
31+ if ( shuttleSpeed > 17500 ) {
32+ console . log ( "ALERT: Escape velocity reached!" ) ;
33+ } else if ( shuttleSpeed < 8000 ) {
34+ console . log ( "ALERT: cannot maintain orbit!" ) ;
35+ } else {
36+ console . log ( "Stable speed" ) }
You can’t perform that action at this time.
0 commit comments