Skip to content

Commit b4c6afc

Browse files
committed
Studio class 2
1 parent 6f8ccba commit b4c6afc

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,35 @@ let weatherStatus = "clear";
1818
let preparedForLiftOff = true;
1919

2020
// add logic below to verify total number of astronauts for shuttle launch does not exceed 7
21-
if (astronautCount <= 7 && astronautStatus === "ready" && totalMassKg < maximumMassLimit &&
22-
(fuelTempCelsius >= -300 && fuelTempCelsius <= -150) && fuelLevel === "100%" &&
23-
weatherStatus === "clear");
21+
if (astronautCount <= 7)
22+
console.log(preparedForLiftOff)
2423

2524
// add logic below to verify all astronauts are ready
25+
if (astronautStatus === "ready")
26+
console.log(preparedForLiftOff)
2627

2728
// add logic below to verify the total mass does not exceed the maximum limit of 850000
29+
if (totalMassKg < 850000)
30+
console.log(preparedForLiftOff)
2831

2932
// add logic below to verify the fuel temperature is within the appropriate range of -150 and -300
33+
if ((fuelTempCelsius > -300) && (fuelTempCelsius < -150))
34+
console.log(preparedForLiftOff)
35+
3036

3137
// add logic below to verify the fuel level is at 100%
38+
if (fuelLevel = "100%")
39+
console.log(preparedForLiftOff)
40+
3241

3342
// add logic below to verify the weather status is clear
3443

44+
if (weatherStatus = "clear")
45+
console.log(preparedForLiftOff)
46+
47+
3548
// Verify shuttle launch can proceed based on above conditions
49+
50+
if (preparedForLiftOff) {
51+
console.log("Have a safe flight astronauts!");
52+
}

booleans-and-conditionals/studio/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)