Skip to content

Commit 55f7ff9

Browse files
committed
Merge branch 'main' of github.com:kb122215/javascript-projects into main
2 parents efa4cef + 88aebc9 commit 55f7ff9

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

arrays/exercises/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"readline-sync": "^1.4.10"
4+
}
5+
}

functions/studio/studio-functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// 4. Return the reversed number.
1818
// 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.
1919

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

2222
// 1. Define and initialize an empty array.
2323
// 2. Loop through the old array.

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ console.log("Fuel level: " + checkFuel(fuelLevel));
2525
console.log("Hold status: " + holdStatus(cargoHold));
2626

2727
/* Steal some fuel from the shuttle:
28-
* /
28+
*/
2929

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

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

3838
/* Next, liberate some of that glorious cargo.
39-
* /
39+
*/
4040

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

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

4949
/* 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.
50-
* /
50+
*/
5151

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

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

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

more-on-functions/studio/part-three-number-sorting-easy-way.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ let nums3 = [200, 5, 4, 10, 8, 5, -3.3, 4.4, 0];
55

66
//Sort each array in ascending order.
77

8-
//Sort each array in decending order.
8+
//Sort each array in descending order.

0 commit comments

Comments
 (0)