Skip to content

Commit d6561d0

Browse files
committed
Completed Data and Variables Studio
1 parent 31631df commit d6561d0

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

booleans-and-conditionals/studio/data-variables-conditionals.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,31 @@ if (astronautCount<=7){
2525
if (fuelLevel === 100){
2626
if (weatherStatus === "clear"){
2727
preparedForLiftOff = true;
28-
if (preparedForLiftOff === true){
29-
console.log("--------")
30-
}
28+
3129

3230
}
3331
}
3432
}
3533
}
3634
}
3735
}
38-
if (preparedForLiftOff === true){
39-
console.log(----------"")
40-
console.log("Date:" +date)
41-
42-
}
36+
if (preparedForLiftOff === true){
37+
console.log("--------");
38+
console.log("All systems are a go! Initiating space shuttle launch sequence.");
39+
console.log("Date: " + date);
40+
console.log("Time: " + time);
41+
console.log("Astronaut Count: " + astronautCount);
42+
console.log("Crew Mass: " + crewMassKg + " Kg");
43+
console.log("Fuel Mass: " + fuelMassKg + "Kg");
44+
console.log("Shuttle Mass: " + " Kg");
45+
console.log("Total Mass: " + totalMassKg + " Kg");
46+
console.log("Weather Status: " + weatherStatus);
47+
console.log("--------");
48+
console.log("Have a safe trip, astronauts!");
49+
} else {
50+
console.log("System error. Shuttle not cleared for liftoff.");
51+
}
52+
4353

4454
// add logic below to verify all astronauts are ready
4555

0 commit comments

Comments
 (0)