importance: 4
---
# Sortable table
Make the table sortable: clicks on `
` elements should sort it by corresponding column.
Each ` | ` has the type in the attribute, like this:
```html
*!*
Age |
Name |
*/!*
5 |
John |
10 |
Ann |
...
```
In the example above the first column has numbers, and the second one -- strings. The sorting function should handle sort according to the type.
Only `"string"` and `"number"` types should be supported.
The working example:
[iframe border=1 src="solution" height=190]
P.S. The table can be big, with any number of rows and columns.
|