var a = new Array();
var x;
for (i=0; i<=9; i++) {
x = Math.floor(Math.random()*20);
//validation missing before insert
a[i]=x;
}
document.write(a[0] + "<br />");
document.write(a[1] + "<br />");
document.write(a[2] + "<br />");
document.write(a[3] + "<br />");
document.write(a[4] + "<br />");
document.write(a[5] + "<br />");
document.write(a[6] + "<br />");
document.write(a[7] + "<br />");
document.write(a[8] + "<br />");
document.write(a[9] + "<br />");
|