-1 is the last element