I'm using divs in JavaScript to test JavaScript's intersection observer api (https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). I'm essentially testing how well it is able to detect divs when they enter the viewport. Another thing I'm trying to test is how well the intersection observer api deals with large amounts of divs. Currently all I have 30 manually duplicated divs like so:
<div id="one">1</div>
<div id="two">2</div>
<div id="three">3</div>
<div id="four">4</div>
<div id="five">5</div>
My aim is to really push this test & possibly have 500+ divs but it seems a bit silly thinking I must manually typing out 500+ divs. I was wondering if there is an easier way of achieving multiple divs of this amount? I've read around online & seen people speak of writing a script for it but no elaboration or examples available which would be helpful because I don't fully understand how that would work.