Kevin Powell - CommunityKP-C
Kevin Powell - Community6mo ago
6 replies
Faker

.map() function in JS used on a CONST variable

const listItems = products.map(product =>
  <li key={product.id}>
    {product.title}
  </li>
);


How can listItems be a const? The array elements are appended as we loop through ? Can someone explain what is happening here please.
Was this page helpful?