title: java script split array into multiple arrays using N count
body: <p>Hi i want to split an array by some given count. </p>
  
  <pre><code>arr = [0,1,2,3,4,5,6,7,8,9,10]
  $scope.arraySpliter(arr);
  $scope.arraySpliter = function (a) {
          var arrays = [], size = 3;
          var tempCount = Math.ceil(a.length / 3);
  
          while (a.length &gt; 0)
              arrays.push(a.splice(0, tempCount));
  
          console.log(arrays);
      };
  </code></pre>
  
  <p>I want split array like this.
  [0,1,2,3][4,5,6,7][8,9,10]</p>