Below is my code I have question.
const joinedProducts = products.map(product => ({
id: product.id,
name: product.name,
price: product.price,
thumbnail_image: product.thumbnail_image,
categories: productCategoriesObj[product.id],
options: productOptionsObj[product.id]
}))
I think argument of Array.map is callback function. But my code is callback function but after arrow, It is not started curly brakets and it is started with parentheses.
How does it works starting with parentheses in callback function.?
I'm expecting MDN documentation about javascript Array.prototype.map(). And I'm expecting How does callback function starting with parenthesis in array.map() works.