Skip to content
Malexion edited this page Oct 31, 2016 · 1 revision

__.last(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 last = __.last([ 3, 6, 1, 0, 34, 296, 19 ]);

console.log(last);

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

console.log(lastfive);