Have you ever needed to look up something in a table? That’s a trivial task for a human, but computers must be given step-by-step instructions to do the same.
Simple Table
Use the following example to learn how to look up somethings in a table.
| Item | Price |
| Oranges | $3.99 |
| Laptop | $1200.00 |
| Marbles | $1.25 |
Sortable Table
You can use a technique called pagination to interact with more complicated tables such as this table that lists countries based on population.
| Rank | Country | Population (million) |
|---|---|---|
| 1 | India | 1,429 |
| 2 | China | 1,426 |
| 3 | United States | 340 |
| 4 | Indonesia | 277.5 |
| 5 | Pakistan | 240.5 |
| 6 | Nigeria | 223.8 |
| 7 | Brazil | 216.4 |
| 8 | Bangladesh | 173 |
| 9 | Russia | 144.4 |
| 10 | Mexico | 128.5 |
| 11 | Ethiopia | 126.5 |
| 12 | Japan | 123.3 |
| 13 | Philippines | 117.3 |
| 14 | Egypt | 112.7 |
| 15 | D.R. Congo | 102 |
| 16 | Vietnam | 99 |
| 17 | Turkey | 84.3 |
| 18 | Iran | 84 |
| 19 | Germany | 83.8 |
| 20 | Thailand | 69.8 |
| 21 | United Kingdom | 67.9 |
| 22 | France | 65.3 |
| 23 | Italy | 60.5 |
| 24 | Tanzania | 59.7 |
| 25 | South Africa | 59.3 |
