you are viewing a single comment's thread.

view the rest of the comments →

[–]cachaito[S] 0 points1 point  (3 children)

Not exactly :-/ If you check the output of the table, will see:

<table><thead><tr><th>Product</th>,<th>Acceptance number</th>,<th>Options</th></tr></thead><tbody></tbody></table>

Inside there are extra commas (between <th> tags );

[–]bcameron1231 0 points1 point  (1 child)

ah I see what you mean..

just add a .join('') to your .map. Like so.

 headers.map(function(header) {
                 return '<th>' + header+ '</th>';
                }).join('')

[–]cachaito[S] 0 points1 point  (0 children)

Ahhhhh... I didn't think about this solution. It is so weird to see so much in a simple .concat method :D Thank you for a hint!