a=[]; for (j=0; j<10; j++) a[j]=Math.abs(Math.round(Math.random()*6-0.5)); console.log(a); j=0; m=10; while (j