nthArg source npm

_.nthArg([n=0])

Creates a function that returns its nth argument.

Arguments

  1. [n=0] (number)

    The index of the argument to return.

Returns (Function)

Returns the new function.

Example

var func = _.nthArg(1);

func('a', 'b', 'c');
// => 'b'