reduce
Syntax
<array>.reduce(expr, init, update)Arguments
Examples
[1, 2, 3, 4].reduce($this, 0, $acc + $this)
// 10["a", "b", "c"].reduce($this, "", $acc + $this)
// "abc"[2, 3, 4].reduce($this, 1, $acc * $this)
// 24Last updated