Array.prototype.find returns the element, not the index

indexOf only works when you already have the value you are looking for. Finding the first element matching a predicate has meant either a filter() that builds a whole array to take one item from it, or a hand-written loop with a break.

// allocates an array to use one element
var order = orders.filter(function (o) { return o.id === 91; })[0];

// stops at the first match, returns the element
var order = orders.find(function (o) { return o.id === 91; });

It returns undefined when nothing matches, not -1 — the companion findIndex is the one that returns a position. Both short-circuit, so on a long list the difference against filter is real. Firefox has shipped these; Chrome has not yet, so a polyfill is still part of the deal.