Question 2: Using functions from TableUtils and invoking MakeTableBetter
-
Notice that this page creates a new array of user objects (from an original user array)
using the TableUtils methods. The TableUtils methods create properties that are already
<td> tags, nicely aligned (according to data type). Then we pass this new array
to function MakeTableBetter.
-
Modify the code (only on this page) so that it:
-
Creates a new funList array that has the same data as the original "funList",
but the new array properties are actually <td> tags made by
the various methods of TableUtils.js. (Make sure to invoke makeNumber to
format the funList prices as currency).
-
Then passes this new array to
function MakeTableBetter to get back an HTML table with nicely formatted
and aligned cells.
-
Then adds the table (generated by MakeTableBetter) onto this HTML page.