Animating array items one after another

results is an array with 40 items requested using GIT from an api

Using animate.style, they can be animated via js by using:

item.classList.add("animate__animated", "animate__bounceIn")

Now since there is more than one item, it is easier to use the following

results.forEach(result => {
const ResultDiv = document.createElement("div")
ResultDiv.textContent = result.datathatineed
ResultDiv.classList.add("animate__animated", "animate__bounceIn")
}

Now that works, but it lags the website because you are animating 40 divs in one go, so I tried to animate them in order using .forEach and setTimeout() but it just seems to finish the timer then execute the animation for all of them at once

I searched a lot but I didn’t find any results, and I tried using the setTimeout() inside and outside the .forEach but same issue.