# Arrays


**Arrays** are special kind of data which can hold many values

How we can create an array ?

1.  using an array literal []

2. using the **new** keyword


**creating an array using array literal []
**
![Screenshot 2022-09-10 233018.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662832884128/2XvoOEjNC.png align="left")

**creating an array using new keyword**

![Screenshot 2022-09-10 233457.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662833110202/6KTjGAGdt.png align="left")

you can store different data types in an array

![Screenshot 2022-09-10 233842.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662833345058/hinbqpw3S.png align="left")

you can also store functions and other objects inside an array 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662834185536/RgpXeTgaf.png align="left")

**Accessing Array elements**

array index starts from 0,1,2,3,.......so on based on the size of the array we can access array elements the last element in the array will Array[Size - 1]


![Screenshot 2022-09-10 235511.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662834326417/43XUYhTcR.png align="left")

