Example: Function definition
This example demonstrates a function that is used to draw circles on the canvas. Notice the five parameter names used in the function header and their use in the function body.
You can add other function calls to draw more circles.
Note:
Hints:
- undefined
1
2
var myCanvas = document.getElementById("thecanvas");
var context = myCanvas.getContext("2d");
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX