JavaScript_course

Arrays

An array is a special type of variable. It doesn’t just store one value, it stores a list of values.

When to use array

You should consider using an array whenever you are working with a list or a set of values that are related to each other.

It is useful when you want to create a list of n values. Which array is not limited to a number of values in your list.

Create an array

// Ahmed write them c02/js/array-literal Program

Values in array and accessing them

Values in an array are accessed as if they are in a numbered list. It is important to know that the numbering of this list starts at zero (not one).

// Ahmed write them c02/js/update-array program