Visitar URL original
Solved #1 Array.prototype.filter() · wesbos/JavaScript30@107d261 · GitHub
Skip to content

Commit 107d261

Browse files
author
laryl.li
committed
Solved #1 Array.prototype.filter()
1 parent 01c559f commit 107d261

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
// Array.prototype.filter()
3333
// 1. Filter the list of inventors for those who were born in the 1500's
3434

35+
const born = inventors.filter(x => x.year >=1500 && x.year < 1600);
36+
console.log(born);
37+
3538
// Array.prototype.map()
3639
// 2. Give us an array of the inventors first and last names
3740

0 commit comments

Comments
 (0)