title: Loop to shift elements in array to the end
body: <p>Assuming I have an array</p>
  
  <pre><code>let arr = [
      [0,1,0,4],
      [1,0,1,2],
      [0,0,1,1],
      [0,1,0,1]
  ];
  </code></pre>
  
  <p>I want to loop through the array with a higher order array function, and return an array where all values that are not equal to <code>n</code> (in my case let's say <code>n=0</code>) will be stacked against the end of the array:</p>
  
  <pre><code>console.log( arr.map( certainFunction ) );
  //returns this;
  [ [0,0,1,4],
    [0,1,1,2],
    [0,0,1,1],
    [0,0,1,1] ]
  </code></pre>
  
  <p>Is it possible using higher order functions to loop through <code>arr</code> and return the array above?
  Then how will the <code>certainFunction</code> look?</p>