[Solved] how to return array of objects in javascript? [closed]


Have a look at the JS Array Methods, specifically array.filter. This code should do what you need:

var playersWhoDebutedIn2003 = players.filter(player => { return player.debut === 2003;});

solved how to return array of objects in javascript? [closed]