Question: Could you please show me how to modifiy my javascript code so it looks like the picture. I do not need to enter the 'K'
Could you please show me how to modifiy my javascript code so it looks like the picture. I do not need to enter the 'K' or the 'Q' I just need the chess board and the numbering along the top and down the left side.
Thank you
var i = 0;
var j = 0;
var k = 0;
var l = 0;
var m = 0;
//draw the chess board with the king and queen
document.writeln("
| "); document.writeln(" "+k+"} for(l=0; l document.writeln(" | ||
| "); document.writeln(" "+l+"}
for(i=1; i
document.writeln(" | ||
| ");
if((i+j)%2==0) document.writeln(" | "); else document.writeln(" | ");
//if(i==queenY && j==queenX) //document.writeln(" Q
//if(i==kingY && j==kingX) //document.writeln(" K
document.writeln(" | ");
");

| 01 |2 |3 |4 |5 |6 |7 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
