mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
497 B
16 lines
497 B
4 years ago
|
## Nested Objects
|
||
|
|
||
|
Since objects are values, nothing stops you from having objects inside objects.
|
||
|
|
||
|
This is very common and allows to model more complex things.
|
||
|
|
||
|
### Instructions
|
||
|
|
||
|
Create an object `address` with 3 properties:
|
||
|
|
||
|
- `city` property with a value of type `String`
|
||
|
- `postcode` property with a value of type `Number`
|
||
|
- `street` property with a value of type `Object` and 2 properties:
|
||
|
- `name` property with a value of type `String`
|
||
|
- `number` property with a value of type `Number`
|