MCPcopy Create free account
hub / github.com/nodejs/node / withHoles

Function withHoles

deps/v8/test/mjsunit/optimized-foreach.js:379–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377(() => {
378 const a = [1, 2, , 3, 4];
379 function withHoles() {
380 const callback_values = [];
381 a.forEach(v => {
382 callback_values.push(v);
383 });
384 return callback_values;
385 };
386 %PrepareFunctionForOptimization(withHoles);
387 withHoles();
388 withHoles();

Calls 2

forEachMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected