Array.prototype.someintermediateconst users = [{active:false}, {active:true}, {active:false}]
users.some(u => u.active) // β trueUse some() to test whether any object in an array has a particular property value.
some() is commonly used to check whether an array of objects contains at least one item matching a condition.
Challenge: Implement hasAdmin(users) that returns true if any user has role === 'admin'.
hasAdmin([{role: 'user'}, {role: 'admin'}]) // β true
hasAdmin([{role: 'user'}, {role: 'mod'}]) // β false