Array.prototype.findintermediateconst users = [{id:1, name:'Alice'}, {id:2, name:'Bob'}]
users.find(u => u.id === 2) // β {id:2, name:'Bob'}Use find() to locate the first object in an array that matches a property condition.
find() is commonly used to look up an object in an array by a unique property such as an id.
Challenge: Implement findById(items, id) that returns the first item whose id matches.
findById([{id:1,name:'A'},{id:2,name:'B'}], 2) // β {id:2, name:'B'}
findById([{id:1,name:'A'}], 99) // β undefined