Ruby Array Arrays are ordered, integer-indexed collections of any object. Array indexing starts at 0, as in C or Java. A negative index is assumed to be relative to the end of the array — -that is, an index of -1 indicates the last element of the array, -2 is…