Plz help fix the bug
The problem is that u are change the canvas width/height on every loop inside setInterval(). This causes it to clear it everytime, effectively allowing only one rect to be shown since the other gets cleared. Move ur canvas/ctx initialization to the onload() so u only do this once. Also i would suggest to use requestAnimationFrame() instead of setInterval() for animating things
Giorgos Dim can I have example code
What's wrong? :(
Why won't my image display
How the answer is 50?
Number of Ones ( C++ ) question!