Cześć, wie ktoś czemu userThreeName = undefined, wydaje mi się, że chodzi o zwracanie z find, natomiast już sam się pogubiłem
const userToFind = 10;
const allUsers = [
{ name: 'Mat', id: 200 },
{ name: 'Pat', id: 300 },
{ name: 'Kat', id: 10 }
];
const userThree = allUsers.find(({ id }) => id === userToFind);
const { userThreeName, userThreeId } = userThree;
console.log(`Szukany użytkownik to ${userThreeName}`);