![]() |
Lists The dash is used to represent separate sequential items in a list. In the following we have two books.
Notice how we didn’t set a key called “title”. This is because the dash automatically creates a sequence of keys starting at zero. The above books, therefore, would be numbered 0 and 1. Additional books would be numbered 2, 3, 4 and so on. We can make things clearer by adding a title.
In the above, unlike before, there is no conflict between titles as each book is separately represented with the dash. We can successfully add more details for each book.
Go to minute three. |
Items automatically numbered ![]() |