Solución
solution.tsTypeScript
interface User {
id: number;
name: string;
email: string;
}
export function findByEmail(users: User[], email: string): User | null {
// Retorna el primer usuario cuyo email coincida con el argumento
return users.find(user => user.email === email);
}0respuestas