title: Create a ball with a random number in the middle (html canvas and javascript)
body: <p>Im trying to create a ball which generates a different random number in the middle every time the function's called. This is my code for creating a ball object but i have no clue where to put the Math.random method and how to actually draw the number in the middle. Have you got any idea? Below is my JavaScript external file's code:</p>
  
  <pre><code>var c = document.getElementById("canvas");
  var ctx = c.getContext("2d");
  var ball = { 
        radius:50,
        x:200,
        y:150,
        color:"#00F",
        draw:function() {
          var arcStartAngle=0;
          var arcEndAngle=2*Math.PI;
  
          ctx.fillStyle=this.color
          ctx.beginPath();
          ctx.arc(this.x,this.y,this.radius,arcStartAngle,arcEndAngle);
          ctx.fill();
        }
   }
  ball.draw();
  </code></pre>