Skip to content

Commit b340020

Browse files
committed
fixed raid-a-shuttle
1 parent d4978fb commit b340020

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

more-on-functions/exercises/raid-a-shuttle.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ let cargoHold = ['meal kits', 'space suits', 'first-aid kit', 'satellite', 'gold
2424
console.log("Fuel level: " + checkFuel(fuelLevel));
2525
console.log("Hold status: " + holdStatus(cargoHold));
2626

27-
/* Steal some fuel from the shuttle:
28-
* /
27+
// Steal some fuel from the shuttle:
2928

3029
//a). Define an anonymous function and set it equal to a variable with a normal, non-suspicious name. The function takes one parameter. This will be the fuel level on the shuttle.
3130

@@ -35,8 +34,8 @@ console.log("Hold status: " + holdStatus(cargoHold));
3534

3635
//d). Decide where to best place your function call to gather our new fuel.
3736

38-
/* Next, liberate some of that glorious cargo.
39-
* /
37+
// Next, liberate some of that glorious cargo.
38+
4039

4140
//a). Define another anonymous function with an array as a parameter, and set it equal to another innocent variable.
4241

@@ -46,12 +45,11 @@ console.log("Hold status: " + holdStatus(cargoHold));
4645

4746
//d). Don’t get hasty, matey! Remember to test your function.
4847

49-
/* Finally, you need to print a receipt for the accountant. Dont laugh! That genius knows MATH and saves us more gold than you can imagine.
50-
* /
48+
// Finally, you need to print a receipt for the accountant. Don’t laugh! That genius knows MATH and saves us more gold than you can imagine.
49+
5150

5251
//a). Define a function called irs that can take fuelLevel and cargoHold as arguments.
5352

5453
//b). Call your anonymous fuel and cargo functions from within irs.
5554

5655
//c). Use a template literal to return, "Raided _____ kg of fuel from the tanks, and stole ____ and ____ from the cargo hold."
57-

0 commit comments

Comments
 (0)