Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop over a nerber in react

const n = 8;

{[...Array(n)].map((elementInArray, index) => ( 
    <div className="" key={index}> Whatever needs to be rendered repeatedly... </div> 
    ) 
)}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #nerber #react
ADD COMMENT
Topic
Name
7+8 =