ARRAYS
The Array
object is used to store multiple values in a single variable.
Array Object Reference
For a complete reference of all the properties and
methods that can be used with the Array object, go to our complete Array object
reference.The reference contains a brief description and examples of use for
each property and method!
What is an Array?
An array
is a special variable, which can hold more than one value, at a time.
If you
have a list of items (a list of car names, for example), storing the cars in
single variables could look like this:
cars1="Saab";
cars2="Volvo";
cars3="BMW";
Access an Array
You can
refer to a particular element in an array by referring to the name of the array
and the index number. The index number starts at 0.
Modify Values in an Array
To modify a value in an existing array, just add a
new value to the array with a specified index number:
myCars[0]="Opel";
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.