Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

array,split

var meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
  , novoArray = []
  , corte = 5;

for (var i = 0; i < meuArray.length; i = i + corte) {
  novoArray.push(meuArray.slice(i, i + corte));
}

console.log(novoArray);
 Executar
Source by pt.stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+2 =