May 2017
Intermediate to advanced
448 pages
10h 10m
English
The work we're doing with the authors array is fine if we only plan to call the buildRows() function once. However, since we intend to call it each time the rows are sorted, it's a good idea to have the author information formatted ahead of time. While we're at it, we can format the title and the author information for sorting as well. Unlike the second table, in which each row had sortable data in the data-book attribute and display data in the table cells, the JSON data we're retrieving for the third table comes in only one flavor. Still, by writing one more function, we can include modified values for sorting and displaying before we ever get to the table building functions:
const buildAuthors = (row, separator ...
Read now
Unlock full access