Ruby array elements can be accessed using #[] method. You can pass one or more than one arguments or even a range of arguments.
Syntax:
#[] method
Methods used to access Ruby elements: