My Goal today is to apply a class to all elements inside a nested array and wait a 1-sec delay before applying the same class to all elements of the next nested array and removing the class applied to the previous nested array. At the moment my class is been applied to all elements of all nested arrays simultaneously. This is as far as I can get with my code as I don't know how to proceed. Any help on what to look for to solve this with JavaScript or Jquery will be much appreciated.
let sequencing = [["01-01", "02-01", "03-01"],["01-02", "02-02", "03-02"],["01-03", "02-03", "03-03"],["01-04", "02-04", "03-04"]];
// This loop is for outer array
for (let i = 0; i < sequencing.length; i++) {
// console.log(sequencing[i]);
// This loop is for inner-arrays
for (var j = 0; j < sequencing[i].length; j++) {
//console.log(sequencing[j]);
// Accessing each elements of inner-array
$("#"+sequencing[i][j]).addClass("up");
}
}