21 / 26
read the snippet · pick its Big-O
// Looks idiomatic, runs slowly. Avoid in hot paths.function buildIds(events) {let ids = [];for (const e of events) {ids = [ids, e.id];}return ids;}
// Looks idiomatic, runs slowly. Avoid in hot paths.function buildIds(events) {let ids = [];for (const e of events) {ids = [ids, e.id];}return ids;}