Answer the question
In order to leave comments, you need to log in
Why is fillRect not a function in the loop?
Good afternoon, tell me why when using cycles it says that fillRect is not a function
?
https://jsfiddle.net/f4ocguv4/20/
Answer the question
In order to leave comments, you need to log in
Because you overwrote it (wtf?):
if(arr[i][j] == "w") {
ctx.fillRect = "white"; // чооооо?
} else {ctx.fillRect = "black" // чооооо?}
ctx.fillStyle = "#FF0000";
ctx.fillRect(20,20,150,100);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question