removeFromEnd method

void removeFromEnd(
  1. int count
)

Removes the number of elements defined by count from the end of the list.

Implementation

void removeFromEnd(int count) {
  assert(count >= 0 && count <= length);
  removeRange(length - count, length);
}