title: assign variable in a for-loop
body: <p>I am trying to assign the element with the lowest count into a new array property <code>lowestAlph</code> and give me the below iteration where <code>-2</code> is being stored, instead of simply outputting the lowest count <code>-2</code> on its own :</p>
  <p>[[&quot;n&quot;], [&quot;o&quot;, &quot;p&quot;], [&quot;q&quot;], [&quot;r&quot;, &quot;s&quot;], -2]</p>
  <p>However, it's not printing the correct output with the <code>push</code> method.
  Could someone please help?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const example = {
      alph: [
          [["a"], ["b", "c"], ["d"], ["e", "f"], 23],
          [["g"], ["h", "j"], ["k"], ["l", "m"], 19],
          [["n"], ["o", "p"], ["q"], ["r", "s"], -2],
          [["t"], ["u", "w"], ["x"], ["y", "z"], 25]
      ],
  
      lowestAlph: [],
  
  
      calcLow: function () {
          let lowest = this.alph[0][4];
          for (let i = 0; i &lt; this.alph.length; i++) {
              for (let n = i + 1; n &lt; this.alph.length; n++) {
                  if (this.alph[n][4] &lt; lowest)
                      lowest = this.alph[n][4]
              }
                  //this.lowestAlph.push(this.alph[i])
          }
          return lowest;
      }
  }
  
  console.log(example.calcLow());</code></pre>
  </div>
  </div>
  </p>