Arrays

Arrays in JavaScript

An Array in JavaScript is a collection of items. The items can be accessed and modified. The whole array can be passed as a parameter to some function. Since JavaScript is typeless we can store data of any kind. The array automatically creates a variable called length which automatically gives the size…