What goes in the blank?
// first matching element, not its index const found = items.____((i) => i.id === target);
Answer: find
find returns the element itself; findIndex returns its position.// first matching element, not its index const found = items.____((i) => i.id === target);
Answer: find
find returns the element itself; findIndex returns its position.