The previous example didn't make it clear whether array_upper returned the last element or the index of the last element.