Name / Value Pair
It is quite simple and the term itself tells us what we are dealing with.
Namely, it is a pair of two elements Name and Value, in which the first element Name maps to one Value.
The Name can be defined more than once, but can only be assigned one Value in any given context. However, Value can be the next Name / Value Pair.
This is an example of an ordinary Name / Value Pair. Where Name - Car, Value - "Mercedes".
The answer is simple - they are a collection of Name / Value Pairs.
Here, we see the Object, which we named LaLiga. It consists of 3 Name / Value Pairs.
- atletico/stadium object
- barcelona/stadium object
It is easy to continue this path and see that the stadium object is a further set of Name / Value Pairs. In our case:
- name/"name of the stadium"
- seats/"number of seats on the stadium
Of course, keep in mind that leaving blank lines of code is not a good code-writing practice. However, I wanted to specify the division of name/value pairs to make them more visible.
I'm going to talk about Global Object.