Removes last empty item from array'