reduce

reduce() -> Array | singleValue

Reduces arrays: one-element arrays are turned into their unique element, while multiple-element arrays are returned untouched.

Example

[3].reduce();
// -> 3

[3, 5].reduce();
// -> [3, 5]