everybody i have this peice of code in nodejs
<table class="invoice-items" cellpadding="0" cellspacing="0">
<tbody>
{ ${Object.values(services).map((service)=>
<tr key={service.title}>
<td>${service.title}</td>
<td>${service.price}</td>
</tr>
)}}
</tbody>
</table>
and get this error E:\ReactCode\SoapyJoes\soapyjoes_dashboard\functions\index.js:115
<tr key={service.title}>
^
[
{ price: '35', quantity: '1', title: 'wash&fold', weight: '2' },
{ price: '10', quantity: '3', title: 'wash', weight: '3' }
]
this is services values SyntaxError: Unexpected token '<'
$
before your map? That could be causing the syntax issue.{ }
to use JS expressions/variablesservices
in the question, and I would also wrap the returned JSX from themap
with( )
since multiline implicit returns can issues