I'm working with an array of records:
const records = [
{
value: 24,
gender: "BOYS"
},
{
value: 42,
gender: "BOYS"
},
{
value: 85,
gender: "GIRLS"
},
{
value: 12,
gender: "GIRLS"
},
{
value: 10,
gender: "BOYS"
}
I need assistance in using JavaScript's reduce() method to extract only the objects with the gender "Boys" from this array, instead of using filter(). Can someone please help me with this?