index.js
function last(arr, cb, thisArg) {
  if (arguments.length === 1) {
    return arr[arr.length - 1];
  }
  if (typeOf(cb) === 'string') {
    return findLast(arr, isType(cb));
  }
  return findLast(arr, cb, thisArg);
}
function last(arr, cb, thisArg) {
  if (arguments.length === 1) {
    return arr[arr.length - 1];
  }
  if (typeOf(cb) === 'string') {
    return findLast(arr, isType(cb));
  }
  return findLast(arr, cb, thisArg);
}
function last ( arr , cb , thisArg ) { if ( arguments . length === 1 ) { return arr [ arr . length - 1 ] ; } if ( typeOf ( cb ) === 'string' ) { return findLast ( arr , isType ( cb ) ) ; } return findLast ( arr , cb , thisArg ) ; }
Return the last element in `array`, or, if a callback is passed,
return the last value for which the returns true.

```js
// `one` and `two` are functions
var arr = ['a', {a: 'b'}, 1, one, 'b', 2, {c: 'd'}, two, 'c'];

utils.last(arr);
//=> 'c'

utils.last(arr, isType('function'));
//=> two

utils.last(arr, 'object');
//=> {c: 'd'}
```
@param  {Array} `array`
@return {*}
@api public
Return the last element in array or if a callback is passed return the last value for which the returns true .