01 - Drawing a Ball/script.js
//a function that draws a circle and fills it with a color

a function that draws a circle and fills it with a color
a function that draws a circle and fills it with a color
function drawBall(x, y, r){
    ctx.beginPath();
    ctx.arc(x, y, r, 0, 2*Math.PI);
    ctx.strokeStyle = "black";
    ctx.stroke();
    ctx.fillStyle = "red";
    ctx.fill();
    ctx.closePath();
}
function drawBall ( x , y , r ) { ctx . beginPath ( ) ; ctx . arc ( x , y , r , 0 , 2 * Math . PI ) ; ctx . strokeStyle = "black" ; ctx . stroke ( ) ; ctx . fillStyle = "red" ; ctx . fill ( ) ; ctx . closePath ( ) ; }
a function that draws a circle and fills it with a color
a function that draws a circle and fills it with a color