function last( arr ) {
	var get;
	var idx;

	// Resolve an accessor for retrieving input array elements:
	get = resolveGetter( arr );

	// Resolve the last index:
	idx = arr.length - 1;

	// Return the last element:
	if ( idx < 0 ) {
		return;
	}
	return get( arr, idx );
}
Returns the last element of an array-like object.

@param {Collection} arr - input array
@returns {*} - last element

@example
var out = last( [ 1, 2, 3 ] );
// returns 3