Tell us what’s happening:
Why after Run the Tests i have the output printed double time?
Thank You
Bart
Console before clicking Run the Tests:
[ { title: 'Inception', ratings: '8.8' },
{ title: 'Interstellar', ratings: '8.6' },
{ title: 'The Dark Knight', ratings: '9.0' },
{ title: 'Batman Begins', ratings: '8.3' } ]
Console after clicking Run the Tests:
// running tests
filteredList
should equal
[{"title": "Inception", "rating": "8.8"},
{"title": "Interstellar", "rating": "8.6"},
{"title": "The Dark Knight", "rating": "9.0"},
{"title": "Batman Begins", "rating": "8.3"}]
. // tests completed // console output
[ { title: 'Inception', ratings: '8.8' },
{ title: 'Interstellar', ratings: '8.6' },
{ title: 'The Dark Knight', ratings: '9.0' },
{ title: 'Batman Begins', ratings: '8.3' } ]
[ { title: 'Inception', ratings: '8.8' },
{ title: 'Interstellar', ratings: '8.6' },
{ title: 'The Dark Knight', ratings: '9.0' },
{ title: 'Batman Begins', ratings: '8.3' } ]
Your code so far
const filteredList = watchList
.filter(e => e.imdbRating >= 8.0)
.map(e => ({
title: e.Title,
ratings: e.imdbRating
}));