title: How to use setInterval or setTimeout with a for loop?
body: <p>I am trying to set an interval when some code runs but only need to do it based on the number of elements there are. Here's a quick example:</p>
  
  <p>5 total elements</p>
  
  <p>Run code once every 20 seconds for each element that is found.</p>
  
  <p>Can someone please give me a basic example how to do this using plain JavaScript? Everything I have tried just executes all of the code at once instead of doing one element at a time.</p>