My circle in canvas animation doesn't want to move on

html
javascript
css

(Medo Fsociety) #1

i m trying my first practice in canvas js/html but it doesn’t work with me here is my code :
html :

canvas { border: black solid 2px; } body{ margin: 0px; }

//here is my code JS
var canvas = document.querySelector(‘canvas’);
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
var c = canvas.getContext(‘2d’);

var x = 200;
function animate()
{ requestAnimationFrame(animate);
c.beginPath();
c.arc(x,200,30,0,Math.PI * 2, false);
c.strokeStyle = “red”;
c.stroke();
x+=1;

}