MCPcopy Create free account
hub / github.com/OBKoro1/web-basics / array-reduce.js

File array-reduce.js

src/js/arrayFunction/array-reduce.js:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// reduce的实现原理
2Array.prototype.reduce1 = function (cb, prev) {
3 for (let i = 0; i < this.length; i++) {
4 if (prev === undefined) {

Callers

nothing calls this directly

Calls 2

flatFnnFunction · 0.85
composeFunction · 0.70

Tested by

no test coverage detected