var mass = [1,2,3,4,5,6,7,8,9,10];
for(i=0;i<mass.length;i++){
mass[i].document.getElementById('root').innerHTML;
}
var r = document.getElementById('root').innerHTML;
var mass = [1,2,3,4,5,6,7,8,9,10];
for(i=0;i<mass.length;i++){
r = mass[i];
}
первый вариант:
var mass = [1,2,3,4,5,6,7,8,9,10];
for(i=0;i<mass.length;i++){
document.getElementById('root').innerHTML += mass[i];
}
второй вариант:
var r = document.getElementById('root');
var mass = [1,2,3,4,5,6,7,8,9,10];
for(i=0;i<mass.length;i++){
r.innerHTML += mass[i];
}
var mass = [1,2,3,4,5,6,7,8,9,10];
for (document.getElementById("root").innerHTML = mass.join(","); 0;)