title: How to properly iterate through nested arrays with javascript.
body: <p>I am having a hard time learning how to iterate through nested arrays, and storing specific array values in javascript. </p>
  
  <pre><code>$('#btn2').click(function(e){
      e.preventDefault();
      var res = hjs.getValue([1,2,3],['bri', 'alert','name', 'hue', 'sat']);
      console.log(res);
  });
  </code></pre>
  
  <p>When #btn2 is clicked on, the following is outputed to my console:</p>
  
  <p><img src="https://i.stack.imgur.com/MywDx.png" alt="enter image description here"></p>
  
  <p>If I'd like to access anyone of these values how would I do so? How do I store the value in a variable?</p>