# Negative indices count from the end of the array back to the beginning of the array. array = ['Hello', 'there', 'AAA', 1, 2, 3] puts array[-1] #prints 3
Tags: beginning count
文章來源:
# Negative indices count from the end of the array back to the beginning of the array. array = ['Hello', 'there', 'AAA', 1, 2, 3] puts array[-1] #prints 3
文章來源: