We can access the element of an array using the index number. Here is the syntax for accessing elements of an array,
Let's see an example of accessing array elements using index numbers.
The output for the above code block will be
In the above example, notice that we are using the index number to access each element of the array. We can use loops to access all the elements of the array at once.