How to move a line after every 10 numbers?

Can't solve the problem.
There is an empty array which I filled with numbers from 0 to 100. I want to make a transfer for each new row after every 10th number;

var i = 0;
var arr = [];

while (i<100){

my solution which is not working

for (var j=0; j<arr.length; j++){ document.write(arr[j]+"<br>";)
June 14th 19 at 20:34
2 answers
June 14th 19 at 20:36
June 14th 19 at 20:38
Somehow, for example
for(i=0;i<100;t+=++i+(i%10?' ':"\n")){}

It's hard to read such code, and especially to the beginner. But it works :) - Jefferey.Carroll commented on June 14th 19 at 20:41
but if I need to replace the information in the div? It is not tolerated, and vvodit a number 1 all values - Ora commented on June 14th 19 at 20:44
in my example, "\n" if you need you the HTML output, replace on <br> - Austen.Thompson53 commented on June 14th 19 at 20:47

Find more questions by tags JavaScript