Skip to content
Malexion edited this page Oct 31, 2016 · 2 revisions

__.first(obj, [options])

  • obj Item to iterate over.
  • [options] [Optional] Object to modify what this function returns, { keys: false, limit: 1 } is the default.

Examples

var first = __.first([ 3, 6, 1, 0, 34, 296, 19 ]);

console.log(first);

var firstfive = __.first([ 3, 6, 1, 0, 34, 296, 19 ], { limit: 5 });

console.log(firstfive);
Clone this wiki locally