Lists in 5 minutes - Minute 2

Lists

The dash is used to represent separate sequential items in a list. In the following we have two books.

- The New Market Wizards
- The Richest Man in Babylon

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.

- title : The New Market Wizards
- title : The Richest Man in Babylon

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.

- title    : The New Market Wizards
  author   : Jack D Schwager  
  keywords : Finance  
  isbn     : 978-0-88-730667-9  
  rating   : 9  
   
   
- title    : The Richest Man in Babylon  
  author   : George S Clason  
  keywords : Finance  
  isbn     : 0-451-20536-7  
  rating   : 7  

Go to minute three.

Summary

Items automatically numbered




disclosure
I'm Listening!   -   Press   -   Privacy   -   Terms of Service

Copyright © 2002 - 2010 alwayspages