Important Types of Basic Data Structures
Let's summarize what we’ve learned about the important types of basic data structures in JavaScript.
We'll cover the following
Types of data structures
In summary, here are the four types of important basic data structures:
- Arrays, such as
["one", "two", "three"]
, are special JS objects. Since they are dynamic, however, they behave more like array lists in JavaScript. - Records are special JS objects, such as
{firstName:"Tom", lastName:"Smith"}
. - Maps can be ordinary JS objects having only key-value slots, such as
{"one":1, "two":2, "three":3}
, orMap
objects. - Entity tables, like the ones shown below, are special maps in which the values are entity records with a standard ID (or primary key) slot, so that the keys of the map are the standard IDs of these entity records. An example of an entity table representing a collection of books is given below:
Get hands-on with 1400+ tech skills courses.