You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*Q-1: Write a function buildTable that, given an array of objects that all have the same set of properties, builds up a DOM structure representing a table. The table should have a header row with the property names wrapped in <th> elements and should have one subsequent row per object in the array, with its property values in <td> elements.
The Object.keys function, which returns an array containing the property names that an object has, will probably be helpful here.
Once you have the basics working, right-align cells containing numbers by setting their style.textAlign property to "right".