Javascript - Nested Objects
📖 Read the lesson
Code Life
By Pierre Marsaa
Objects Inside Objects
A property value can itself be an object. A trainer has a starter Codémon, and that Codémon has its own properties:
↗️
Loading editor...
↶
▶️ Run
↷
Read the chain from left to right:
trainer.starter
is an object, then
.name
reads inside it. You can chain as many dots as there are levels.
Verify