getLastItemByOrder<T extends Object> method

T? getLastItemByOrder<T extends Object>([
  1. int order = 1
])

获取数组中倒数第n项元素(order: 第n项)(默认:order = 1,返回倒数第一项的元素)

Implementation

T? getLastItemByOrder<T extends Object>([int order = 1]) {
  return get<T>(size() - order);
}