I want to fill a grid cell on clicking on the particular cell.Here is my code:
function drawBox()
{
for (var row = 0; row < 14; row ++)
{
for (var column = 0; column < 13; column ++)
{
var x = column * 40;
var y = row * 40;
context.beginPath();
context.rect(x, y, 40, 40);
context.fillStyle = "white";
context.fill();
context.lineWidth = 3;
context.strokeStyle = 'black';
context.stroke();
}
}
}