We know about variable right? Now we are going to learn about data structures.
In computer science, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. [wikipedia]
I think it’s easy enough to understand. Up until now we were just using the variable to store a single data, now we are going to learn about array where we can store multiple data.
It’s easy. we need to initial a variable and put some values in there.
See this is so easy –
In the browser we can see some interesting things about the array. There is some indexing here of the each elements.
Array indexing count from one. If we want, we can just console log
Chandler using array –
If you give a value which is more than index value then it will give you undefined –
Do you understand the Array ?