title: How can i apply a class to all elements inside a nested array but with an interval before apply the same class to the next nested array?
body: <p>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.</p>
  <pre><code>let sequencing = [[&quot;01-01&quot;, &quot;02-01&quot;, &quot;03-01&quot;],[&quot;01-02&quot;, &quot;02-02&quot;, &quot;03-02&quot;],[&quot;01-03&quot;, &quot;02-03&quot;, &quot;03-03&quot;],[&quot;01-04&quot;, &quot;02-04&quot;, &quot;03-04&quot;]];
  
  
  
  // This loop is for outer array
  for (let i = 0;  i &lt; sequencing.length; i++) {
  
      // console.log(sequencing[i]);
    
  
  // This loop is for inner-arrays
    for (var j = 0; j &lt; sequencing[i].length; j++) {
  
      //console.log(sequencing[j]);
  
      // Accessing each elements of inner-array
      $(&quot;#&quot;+sequencing[i][j]).addClass(&quot;up&quot;);
     
    }  
   }
  </code></pre>