In JavaScript, Arrays can be a collection of elements of any type. This means that you can create an array with elements of type String, Boolean, Number, Objects, and even other Arrays.
An Arrays is a data structure that contains list of elements which store multiple values in a single variable.
In javascript, There are many JavaScript array methods.
In React, the .map() array method is most useful.
This method creates a new array with the results of calling a provided function on every element in this array.
In React, map( ) can be used to generate lists of items.
import React from 'react';
import ReactDOM from 'react-dom';
const myArray = ['kiwi', 'pineapple', 'apple'];
const myList = myArray.map((item) => <p>{item}</p>)
ReactDOM.render(myList, document.getElementById('root'));