In React, when we are working with dynamic data, it is common to render a list of items. In React, there are several methods to render the list efficiently.
Array.map() is a built-in JavaScript function provided by JavaScript. It iterates over the list of items in the array and returns a list of React components
map() function is called over the array, and a callback function is accepted as an argument
callback function will take the item and index as arguments
index should be used as a key for the item
To start the application run the following command.
for loop is a control flow statement in JavaScript. It is used to iterate over the items in a array. In this iterator or loop variable will be used to access the array elements.