score:4

Accepted answer

because you are not doing anything inside foreach (no assignment, no calculation), also foreach will not return anything, use map to return the tablecell for each array entry.

eslint will throw an error, if you write a foreach loop without any operation.

write it like this:

{object.values(bookings[e]).map(value => (
    <tablecell>{value}</tablecell>
))}

score:0

you are just missing a closing ) :

 object.values(bookings[e]).map(value => (
            <tablecell>{value}</tablecell>
  ))} // <--

Related Query

More Query from same tag