I'm doing a practice with callback functions I have an array with three indices or positions, what I want to know is if you can make it go through the array and print the value of the first position or index of the array then wait 2 seconds to print the value of the next position of the array and so on until all the values of the array in the console are written. With the following algorithm I get a similar result but it is not the expected one thanks for your support.
Greetings.
let array1 = ['a', 'b', 'c'];
const imprime = () => {
setInterval(() => {
array1.forEach(ele => {
console.log(ele)
})
}, 2000);
}
imprime()