Example 1 — Official: Reverse Arguments
Show the call order vs what func receives.
var flipped = _.flip(function () {
return _.toArray(arguments);
});
flipped("a", "b", "c", "d");
// → ["d", "c", "b", "a"] How It Works
- Wrap.
_.flipreturns a new callable. - Call. You pass
a, b, c, din that order. - Reverse. Lodash reverses them before invoking
func. - Result.
_.toArray(arguments)showsd…a.

