Skip to content

Commit 2e35553

Browse files
committed
Answer wesbos#1
1 parent 6b98a14 commit 2e35553

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

04 - Array Cardio Day 1/index-START.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<title>Array Cardio 💪</title>
67
<link rel="icon" href="https://fav.farm/🔥" />
78
</head>
9+
810
<body>
911
<p><em>Psst: have a look at the JavaScript Console</em> 💁</p>
1012
<script>
@@ -35,9 +37,11 @@
3537
'Berne, Eric', 'Berra, Yogi', 'Berry, Wendell', 'Bevan, Aneurin', 'Ben-Gurion, David', 'Bevel, Ken', 'Biden, Joseph', 'Bennington, Chester', 'Bierce, Ambrose',
3638
'Billings, Josh', 'Birrell, Augustine', 'Blair, Tony', 'Beecher, Henry', 'Biondo, Frank'
3739
];
38-
40+
3941
// Array.prototype.filter()
4042
// 1. Filter the list of inventors for those who were born in the 1500's
43+
const before = inventors.filter(inventor => inventor.year >= 1500 && inventor.year < 1600)
44+
console.table(before);
4145

4246
// Array.prototype.map()
4347
// 2. Give us an array of the inventors first and last names
@@ -59,8 +63,9 @@
5963

6064
// 8. Reduce Exercise
6165
// Sum up the instances of each of these
62-
const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck' ];
66+
const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck'];
6367

6468
</script>
6569
</body>
66-
</html>
70+
71+
</html>

0 commit comments

Comments
 (0)