An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length.
There are three different kind of arrays and each array value is accessed using an ID c which is called array index.
These arrays can store numbers, strings and any object but their index will be prepresented by numbers. By default array index starts from zero.
Following is the example showing how to create and access numeric arrays.
Here we have used array() function to create array. This function is explained in function reference.
This will produce following result:
© 2015-16 All Rights Reserved Tech9schools