I started a few weeks ago programming HTML5, and now i am actually learning more about canvas, the first exercise was to create a rectangle and fill it in js. but, it's seems not to work. Where is the problem?
code:
<head>
<title>Canvas Exercise</title>
<script type="text/javascript">
myCanvas = document.getElementById("canvasTry");
context = myCanvas.getContext("2d");
context.fillStyle = "#FF0000";
context.fillRect = (10,10,150,150);
</script>
</head>
<body>
<canvas id="canvasTry" width="300px" height="150px" style="border:2px solid black">
!! IF YOU READ THIS, YOUR BROWSER DO NOT SUPPROT CANVAS !!
</canvas>
</body>