Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

map method in react

function ShowName() {
  const userNames = ["Kunal", "Braj", "Sagar", "Akshay"];
  
  return (
    <>
      <div>
            { 
              
              userNames.map((elem) => {
              <h1>{elem}</h1>
              })
            
            }
          </div> 
    </>
  );
}

export default ShowName;
Source by # #
 
PREVIOUS NEXT
Tagged: #map #method #react
ADD COMMENT
Topic
Name
9+6 =