const array = [
"aplus",
"ant",
"bean",
"cookie",
"corncob",
"corndog",
"potato",
"skunk",
"rabbit",
"duck",
"deer",
"boar",
"dragon",
"seaweed",
"fish",
"rarefish",
"exoticfish",
"jellyfish",
"legendaryfish",
"kraken",
"junk",
"garbage",
"trash",
"worm",
"ladybug",
"stickbuy",
"spider",
"banhammer",
"musicalnote",
"energydrink",
"memepills",
"lawdegree",
"vaccine",
"beakerofsusfluid",
"ectoplasm"
];
array.forEach(item => console.log(item));
Is there a way to log all the items in the array after an interval of 5
seconds for each item?
When I try to use an setTimeout function it sends the first value after 5 second and after that it sends all the other values at once..