title: can we use recursion for this case in multidimensional arrays to push new values
body: <p>how to push the the new value in each arrays <code>container</code> if the fruits container &lt; the target we wanted,</p>
  
  <p>example: </p>
  
  <pre><code>- we should push new fruits in those 2d arrays:
   - List item
   - the  maximun "apple" in container must has 3 fruits,
  more than it, we should push to new array/index  in next 2d array container
   - the  maximun "mango" in container must has 2 fruits,
  more than it, we should push to new array/index in next 2d array container
   - the  maximun "stawberry" in container must has 4 next fruits,
  more than it, we should push to new array/index in next 2d array container
  </code></pre>
  
  <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 stawberry = x =&gt; {
       return x.filter(el =&gt; el === "stawberry").length;
    }
  
  const apple = x =&gt; {
       return x.filter(el =&gt; el === "apple").length;
    }
  
  const mango = x =&gt; {
       return x.filter(el =&gt; el === "mango").length;
    }
  
  const fruits = kindOfFruits =&gt; {
  
    if(kindOfFruits.length === 0){
      return [];
    } else if(stawberry(kindOfFruits[0]) === 0 ){
      kindOfFruits[0].push("NEW STAWBERRY");
    }
    return kindOfFruits.concat((fruits(kindOfFruits.slice(1))));
  }
  
  const container = [
    ["apple", "apple", "banana", "mango", "stawberry", "banana", "banana"],
    ["banana", "mango", "stawberry", "stawberry"],
    ["apple", "mango", "mango"]
  ];
  
  console.log(fruits(container));</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want the RESULT like this:</p>
  
  <pre><code>[
    ["apple", "apple", "banana", "mango", "stawberry", "banana", "banana", "apple", "mango", "stawberry ", "stawberry", "stawberry"],
    ["banana", "mango", "stawberry", "stawberry", "apple", "apple" , "stawberry"],
    ["apple", "mango", "mango"]
  ];
  </code></pre>
  
  <p>NOTE:
  it doest matter if the fruits not sorting when we push , as long the fruits in container same like we wanted to push :D,</p>
  
  <p>the data container already made, and we just need to put fruits in each containers 2d arrays ,
  like the rules above I said</p>
  
  <p>I hope my questions make sense, sorry if don't </p>