title: Array of arrays with repeated values
body: <pre><code>    let array = [
         [&quot;7&quot;, &quot;s&quot;],
         [&quot;7&quot;, &quot;s&quot;],
         [&quot;6&quot;, &quot;d&quot;],
         [&quot;5&quot;, &quot;f&quot;],
         [&quot;5&quot;, &quot;f&quot;],
         [&quot;5&quot;, &quot;f&quot;],
         [&quot;5&quot;, &quot;f&quot;],
         [&quot;5&quot;, &quot;f&quot;]
      ]
  </code></pre>
  <p>I have an array of arrays. So, most of the items in the array are the same. The result I want should have only one of each of the arrays plus an extra item that states the number of times the array was repeated.</p>
  <pre><code>      //The new third value in the array is the number of times it was repeated.
      [
         [&quot;7&quot;, &quot;s&quot;, 2],
         [&quot;6&quot;, &quot;d&quot;, 1],
         [&quot;5&quot;, &quot;f&quot;, 5]
      ]
  </code></pre>