$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · medium · #231

What goes in the blank?

// the first matching user, or undefined
const hit = users.____((u) => u.id === id);

Answer: find (also accepted: find, find())

find() returns the first matching element, or undefined.
Play Problem Solving ▸