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;
 
PREVIOUS NEXT
Tagged: #map #method #react
ADD COMMENT
Topic
Name
1+4 =