DarkPhoenix,
const users = [
{
balance: '3946.45',
picture: 'http://placehold.it/32x32',
age: 23,
name: 'Bird Ramsey',
gender: 'male',
company: 'NIMON',
email: 'birdramsey@nimon.com',
},
{
balance: '2499.49',
picture: 'http://placehold.it/32x32',
age: 31,
gender: 'female',
company: 'LUXURIA',
email: 'lillianburgess@luxuria.com',
}
];
function getNameFromCurrentContex()
{
return this.name
}
function rejectNoNameUsers(array)
{
return array.filter((elem)=>getNameFromCurrentContex.bind(elem)())
}
console.log(rejectNoNameUsers(users))