var currentColor = firstCheckerBoardColor; var nSquaresFilled = 0; /* TODO add check for canvas dimentions (right now negative values can be inserted and a canvas will be generated, it is just necessary to add a conversion from negative to positive values. */ function fillCheckerboard() { for (var i=0; i