0
I am trying to do an exercise that compares whether the array of objects inserted in a function has any element equal to the following array:
const gooUsers = [
{id: 1},
{id: 2},
{id: 3}
];
The function input could be the following array as an example:
const test = [
{id: 2},
{id: 1}
];
The result in the above case would be true for some() and false for Every(), I believe.
The function I’ve been able to do so far:
const checkUsersValid = goodUsers =>
(submittedUsers) =>{
return goodUsers
.some(value1=> submittedUsers
.some(value2=> value1 === value2));
}
What exactly is your problem?
– MauroAlmeida