I'd like to run this array through the jQuery.each function and add a delay in-between each iteration, creating a pause in between each word appending to the div. I've seen other similar questions answered using setTimeout but I have been unsuccessful applying that to my code.
https://jsfiddle.net/samseurynck/7xw9ujjh/2/
var arr = ["one ", "two ", "three ", "four ", "five "];
function myFunction() {
jQuery.each(arr, function(index, value) {
$(".testBox").append('<p class="box">' + value + '</p>');
console.log('yes');
});
}
myFunction();