DEV Community

Sivakumar Mathiyalagan
Sivakumar Mathiyalagan

Posted on

Array in Js

Arrays in Javascript are non-primitive datatype used to store multiple values of same datatype or different datatypes under a single variable

non-primitive means that values can be mutated - meaning the values can be modified

Characteristics of array

Arrays in Javascript are dynamic and resizable

It is Zero indexed (index starts from 0)

value in an array can be fetched using its index

Array is an in-built object in Javascript and it has some in built methods
like concat(), copyWithin(), every(), filter(), flat(), flatMap(), forEach(), indexOf(), lastIndexOf(), map(), reduce(), reduceRight(), reverse(), slice(), some(), sort(), and splice(). [TBD]

REFERRED IN MDN

Top comments (0)