cc.fillStyle = "color"
cc.fillRect(x, y, w, h)
cc.fillRect(x, y, w, h)
In regards to the above, please note the following:
cc.fillStyle = "color"
cc.fillRect(x, y, w, h)
cc.fillRect(x, y, w, h)
Courtesy of Mozilla
Warning! Note that the width of the entire screen is 500 and the height, 600. X and Y variables exceeding the width/height of canvas means that the shape will not be seen.