Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions arrays/exercises/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"readline-sync": "^1.4.10"
}
}
2 changes: 1 addition & 1 deletion functions/studio/studio-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// 4. Return the reversed number.
// 5. Be sure to print the result returned by the function to verify that your code works for both strings and numbers. Do this before moving on to the next exercise.

// Part Three: Complete Reversal
// Part Three: Complete Reversal - Create a new function with one parameter, which is the array we want to change. The function should:

// 1. Define and initialize an empty array.
// 2. Loop through the old array.
Expand Down
9 changes: 4 additions & 5 deletions more-on-functions/exercises/raid-a-shuttle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ console.log("Fuel level: " + checkFuel(fuelLevel));
console.log("Hold status: " + holdStatus(cargoHold));

/* Steal some fuel from the shuttle:
* /
*/

//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.

Expand All @@ -36,7 +36,7 @@ console.log("Hold status: " + holdStatus(cargoHold));
//d). Decide where to best place your function call to gather our new fuel.

/* Next, liberate some of that glorious cargo.
* /
*/

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

Expand All @@ -47,11 +47,10 @@ console.log("Hold status: " + holdStatus(cargoHold));
//d). Don’t get hasty, matey! Remember to test your function.

/* 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.
* /
*/

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

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

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

//c). Use a template literal to return, "Raided _____ kg of fuel from the tanks, and stole ____ and ____ from the cargo hold."
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ let nums3 = [200, 5, 4, 10, 8, 5, -3.3, 4.4, 0];

//Sort each array in ascending order.

//Sort each array in decending order.
//Sort each array in descending order.