DEV Community

Arul .A
Arul .A

Posted on

Array in JavaScript?

  • An array is a container that holds multiple values in a single variable.

  • Array is Zero indexed :first element index of 0.

  • An array is a dynamic type because it can shrink elements add or remove .

  • An array is heterogeneous(it can store number ,strings)

Example:

fruit=["apple", "orange" ,"banana", "graps"]

Enter fullscreen mode Exit fullscreen mode

Top comments (0)