June 2012
Intermediate to advanced
386 pages
10h 7m
English
Array is one of the non-primitive data types in JavaScript. Regular arrays, associated by an index, start with an index of 0. Associative arrays are indexed by Strings. Since JavaScript is a loosely typed language, the elements of an array need not belong to the same type. Thus, there can be a mix and match of numbers, arrays, objects, etc within an Array.
var arr = new Array();
var arr2 = [‘a’, ‘b’];
There is no need to define a dimension for the Array as is commonly the requirement in other languages like C or C#. The way Arrays are implemented internally is that the elements are behaving as in a hash table. This means they are stored as name-value pairs. This type of implementation makes the job ...
Read now
Unlock full access