Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to write dummy for loop in jsx

// looping over 10 times in react

<div>
     {[...Array(10)].map((x, i) => {
         return <p key={i}>Hello</p>;
      })}
</div>
 
PREVIOUS NEXT
Tagged: #write #dummy #loop #jsx
ADD COMMENT
Topic
Name
1+4 =