var names=new Array(40);
names[0] = "Даша1";
names[1] = "Даша2";
names[2] = "Ваня";
names[3] = "Серый";
names[4] = "Кукда";
names[5] = "Леня1";
names[6] = "Леня2";
names[7] = "Леня3";
names[8] = "Леня4";
names[9] = "Леня5";
names[10] = "Леня6";
names[11] = "Леня7";
names[12] = "Леня8";
var n=0;
while(n <10)
{
n++;
document.write(names[n]+'<br/>');
}