I have an array which have 200 elements like -100 to 100. I want to traverse or iterate this whole array in a specific time duration. for example I want to traverse or iterate this array in 5 second or also in 1 minutes. it’s depend on user that , in how much time is define for traverse this whole array. How can i do it?
const array = [-100,-99,-98....0....98,99,100];
function traverseArr(){
....
}