Skip to content

Commit 75eb0d1

Browse files
committed
TODO1-3
1 parent bf793e6 commit 75eb0d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ console.log(listFinale[0],listFinale[listFinale.length-1])
3636
// 1. Make the function return the number of filming locations in 2020 only
3737
// 2. Log the result
3838
function getFilmingLocationsNumber2020 () {
39-
39+
let list2020 = filmingLocations.filter(x => new Date(x.fields.date_debut).getFullYear()==2020)
40+
return list2020.length
4041
}
41-
console.log()
42+
console.log(getFilmingLocationsNumber2020())
4243

4344
// 📝 TODO: Number of filming locations per year
4445
// 1. Implement the function, the expected result is an object with years as

0 commit comments

Comments
 (0)