1 Arrays
1 Arrays
This lesson will look at how to work with arrays in JavaScript. We will see how we can create arrays , access
elements of an array and various other functionalities with arrays.
Introduction
This is a quick revision of Javascript arrays for the sake of completion. If you
understand Javascript arrays already, it will be quite boring for you.
However, one unique thing about Javascript arrays is that they are actually
objects and indices are just property names in that object. Indices are usually
numbers and so Javascript arrays convert these numerical indices to string
keys and then assign them as object properties. Therefore, if you access
array[0], you are actually accessing property "0" of object array.
2 3 5 7 11 13 17 19 23 29
topics.push('Arrays');
topics.push('Stacks');
topics.push('Queues');
topics.push('Arrays');
topics.push('Stacks');
topics.push('Queues');
Quiz 1
Q
Array ‘tutorial’ is defined as