разобрался ура!!!!!
вот как должно выглядеть:
var colors = ["red","green","blue", "black", "white","yellow","navy"];
var a=0;
document.write('<table border="1">');
while ( a < colors.length){
document.write('<tr><td width="60">'+ colors[a] +'</td><td width="200" style="background:'+ colors[a] +';"></td></tr>')
a++;
}
document.write('</table>');