*
@method last([num] = 1)
@returns Mixed
@short Returns the last element(s) in the array.
@extra When `num` is passed, returns the last `num` elements in the array.

@example

[1,2,3].last()  -> 3
[1,2,3].last(2) -> [2,3]

@param {number} [num]

*
193753
function(arr, num) {
    if (isUndefined(num)) return arr[arr.length - 1];
    var start = arr.length - num < 0 ? 0 : arr.length - num;
    return arr.slice(start);
  }
999244
function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
	    // convert -0 to +0
	    if (NEGATIVE_ZERO$1) return $native$1.apply(this, arguments) || 0;
	    var O = _toIobject(this);
	    var length = _toLength(O.length);
	    var index = length - 1;
	    if (arguments.length > 1) index = Math.min(index, _toInteger(arguments[1]));
	    if (index < 0) index = length + index;
	    for (; index >= 0; index--) {
	      if (index in O) if (O[index] === searchElement) return index || 0;
	    }return -1;
	  }
488048
public int getLast()
  {
    if (isEmpty()) {
      return -1;
    }

    int last = 0;
    for (int i = 0; i <= lastWordIndex; i++) {
      int w = words.get(i);
      if (ConciseSetUtils.isLiteral(w)) {
        last += ConciseSetUtils.MAX_LITERAL_LENGTH;
      } else {
        last += ConciseSetUtils.maxLiteralLengthMultiplication(ConciseSetUtils.getSequenceCount(w) + 1);
      }
    }

    int w = words.get(lastWordIndex);
    if (ConciseSetUtils.isLiteral(w)) {
      last -= Integer.numberOfLeadingZeros(ConciseSetUtils.getLiteralBits(w));
    } else {
      last--;
    }
    return last;
  }
269087
public function last()
    {
        $lastIndex = (count($this->source) - 1);
        if (isset($this->source[$lastIndex])) {
            return $this->source[$lastIndex];
        }

        return null;
    }
21733
function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
    // convert -0 to +0
    if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
    var O = toIObject(this);
    var length = toLength(O.length);
    var index = length - 1;
    if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
    if (index < 0) index = length + index;
    for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
    return -1;
  }
1142265
public static int lastIndexOf(double[] array, double val) {
        for (int i=array.length-1; i >= 0; i--) {
            if (array[i] == val) {
                return i;
            }
        }
        return -1;
    }
668487
public function getLastSequenceNumber()
    {
        if (count($this->events) === 0) {
            return $this->lastCommittedSequenceNumber;
        }
        if ($this->lastSequenceNumber === null) {
            $event = end($this->events);
            $this->lastSequenceNumber = $event->getSequenceNumber();
        }
        return $this->lastSequenceNumber;
    }
160622
function(array, maximumLength) {
    var currentNode = array.length - 2;
    var currentDepth;
    for (currentDepth = 1;
         (currentDepth < (maximumLength - 1)) && (currentNode > 1);
         currentDepth++) {
      currentNode =  first (array, currentNode - 1, 0);
    }

    return currentNode;
  }
732658
@Override
	public int lastIndexOf(long elem) {
		for (int i = size-1; i >= 0; i--)
			if (elem==elementData[i])
				return i;
		return -1;
	}
150049
public function lastIndexOf($value) {
        $array = [];
        foreach ($this->array as $key => $val) {
            if (null === $val) {
                continue;
            }
            if (Comparator::equals($val, $value)) {
                $array[] = $key;
            }
        }
        return \count($array) === 0 ? null : $array;
    }
1158350
function extract(num) {
  var hundredth = 0;
  var tenth = 0;
  var one = 0;
  if (num.length === 3) {
    hundredth = int(num[0]);
    tenth = int(num[1]);
    one = int(num[2]);
  }

  if (num.length === 2) {
    tenth = int(num[0]);
    one = int(num[1]);
  }

  if (num.length === 1) {
    one = int(num[0]);
  }

  return [hundredth, tenth, one];
}
703859
public function last(): string
    {
        $this->rewind();
        $previousElement = $this->getCurrentElement();
        while ($this->valid()) {
            $previousElement = $this->getCurrentElement();
            $this->next();
        }
        return $previousElement->getValue();
    }
367033
public function last()
    {
        $last = null;
        foreach ($this->each() as $v) {
            $last = $v;
        }
        return $last;
    }
78092
public static int lastIndexOf(short[] array, short value) {
		if (null != array) {
			for (int i = array.length - 1; i >= 0; i--) {
				if (value == array[i]) {
					return i;
				}
			}
		}
		return INDEX_NOT_FOUND;
	}
935937
public static function last($array, callable $callback = null, $default = null)
    {
        if (null === $callback) {
            return 0 === count($array) ? Mixed::value($default) : end($array);
        }

        return static::first(array_reverse($array, true), $callback, $default);
    }
1206341
public function last()
    {
        $keys = AccessHelper::collectionKeys($this->data);

        if (empty($keys)) {
            return null;
        }

        $value = $this->data[end($keys)] ? $this->data[end($keys)] : null;

        return AccessHelper::isCollectionType($value) ? new static($value, $this->options) : $value;
    }
1214525
public final Optional<T> last() {
        // Iterables#getLast was inlined here so we don't have to throw/catch a NSEE
        Iterator<T> iterator = this.iterator();
        if (!iterator.hasNext()) {
            return empty();
        }

        while (true) {
            T current = iterator.next();
            if (!iterator.hasNext()) {
                return Optional.of(current);
            }
        }
    }