Using delay in for loop, then i becomes undefined [duplicate]

Title says all. My code basically looks like this:

for (i = 0; i < tickers.length; i++){
   console.log(i)//returns number from 1 to 10
   delay(15000)
   console.log(i)//returns undefined

Do you have any idea why this happens? I need a for loop that runs code every 15 seconds without making i undefined. By the way the delay function uses the npm delay function