What goes in the blank?
// index of the first match, or -1 const i = rows.____((r) => r.ok);
Answer: findIndex
findIndex() returns the position, while find() returns the element.
Play Problem Solving ▸
// index of the first match, or -1 const i = rows.____((r) => r.ok);
Answer: findIndex