What is the difference between the arrays and the objects ?

Gastonloukil
Dec 30, 2020

--

Well as an Introduction we can say that we have arrays and objects in JavaScript ,but what’s the real definition of them ? we gonna start with Arrays ,Arrays use numbers to access its “elements”. For example, person [0] returns John: Objects use names to access its “members”.JavaScript variables can be objects. Arrays are special kinds of objects. Because of this, you can have variables of different types in the same Array.

As a conclusion, “Object” and “Array” have very close relations. If you compare “Array” with “Object”, you should see the following similarities and differences: “Array” is prototype, of “Object” .“Array” is not a new data type.

--

--

Gastonloukil
Gastonloukil

No responses yet