Skip to content

Commit 07f5fcd

Browse files
authored
Merge pull request #1 from ga-wdi-exercises/wdi18-changes
Wdi18 changes
2 parents 5c12424 + 62555aa commit 07f5fcd

File tree

6 files changed

+290
-56
lines changed

6 files changed

+290
-56
lines changed

fundamentals.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// NOTE: Make sure to use the `var` keyword for ALL variable declarations.
22

3-
// #1: Create an array of strings called `colors` that contains three colors.
3+
// #1: Create an array of strings called `foods` that contains three foods.
44
// Type your solution immediately below this line:
55

66

@@ -10,12 +10,12 @@
1010

1111

1212

13-
// #3: Create an empty array called `favoriteColors`.
13+
// #3: Create an empty array called `favoriteFoods`.
1414
// Type your solution immediately below this line:
1515

1616

1717

18-
// #4: Create a `for` loop that adds each string in `colors` to `favoriteColors`.
18+
// #4: Create a `for` loop that adds each string in `foods` to `favoriteFoods`.
1919
// Type your solution immediately below this line:
2020

2121

@@ -25,7 +25,7 @@
2525

2626

2727

28-
// #6: Add a `facial-hair` (spelled exactly) property to `instructor` by accessing
28+
// #6: Add a `has-office-hours` (spelled exactly) property to `instructor` by accessing
2929
// it (do not change the original object you typed above) and assigning it
3030
// a boolean value.
3131
// Type your solution immediately below this line:

hof.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
// NOTE: Make sure to use the `var` keyword for ALL variable declarations
22

33
var people = [
4-
{name: "Jane", age: 32},
5-
{name: "Jessica", age: 34},
6-
{name: "Jasmine", age: 39}
4+
{
5+
name: "Layla",
6+
age: 27,
7+
knownLanguages: 3
8+
}, {
9+
name: "Keanu",
10+
age: 54,
11+
knownLanguages: 1
12+
}, {
13+
name: "Jasmine",
14+
age: 35,
15+
knownLanguages: 2
16+
}
717
]
818

9-
// #1: Use the `map` array method to create a new array containing the ages of each
19+
// #1: Use the `map` array method to create a new array containing the names of each
1020
// person in the `people` array. Assign the returned array to a variable
11-
// called `peoplesAges`.
21+
// called `peopleNames`.
1222
// Type your solution immediately below this line:
1323

1424

1525

16-
1726
// #2: Use the `filter` array method to create a new, filtered array containing only
18-
// persons from the `people` array who are older than 35. Assign the returned array
19-
// to a variable called `peopleOlderThan35`.
27+
// persons from the `people` array who know multiple languages. Assign the returned array
28+
// to a variable called `polyglotPeople`.
2029
// Type your solution immediately below this line:

package-lock.json

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

readme.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ You should first test your code's functionality in the browser console via the i
1919

2020
Once you think your code is correct, you can run the tests that will evaluate your solutions to double-check them.
2121

22-
To do so, first install the testing packages:
23-
```
24-
npm install
25-
```
26-
Then call the test runner each time you want to check your code:
22+
To do so, first install the testing packages...
23+
24+
```bash
25+
$ npm install
2726
```
28-
npm test
27+
28+
Then call the test runner each time you want to check your code...
29+
30+
```bash
31+
$ npm test
2932
```

0 commit comments

Comments
 (0)