Code:
background: url(new/grass.png): << this should be a semi-colon
I'm not sure what you are attempting with this line:
but it looks redundant and should be deleted.
The main issue is that you are attempting to read an element beyond the last one (<= length):
Code:
for(x=0; x <= map.length; x++){
// should be
for(x=0; x < map.length; x++){
BTW Your page should have a <title> as well
BTWW I understand it is preferable to use the following to clear the canvas:
Code:
context.clearRect(0, 0, canvas.width, canvas.height);