DEV Community

RADHAKRISHNAN S
RADHAKRISHNAN S

Posted on

ARRAY IN JAVASCRIPT(INTRODUCTION )

What is array?

An Array is an object type designed for storing data collections.

Key characteristics of JavaScript arrays are:

Elements: An array is a list of values, known as elements.

Ordered: Array elements are ordered based on their index.

Zero indexed: The first element is at index 0, the second at index 1, and so on.

Dynamic size: Arrays can grow or shrink as elements are added or removed.

Heterogeneous: Arrays can store elements of different data types (numbers, strings, objects and other arrays).

const cars = ["Saab", "Volvo", "BMW"];
Enter fullscreen mode Exit fullscreen mode

Output: Saab, Volvo,BMW

Top comments (0)