As a novice in Canvas, I've been experimenting with some code, but unfortunately, it's not working for me. Here's the code I used. Can someone help me identify the issue?
<!DOCTYPE html>
<html>
<head>
<title> 28 - Canvas - Create Simple Canvas </title>
<meta charset="utf-8">
<meta name="description" content="Canvas - Create Simple Canvas" >
<style>
canvas{
width: 800px;
height: 400px;
border: 1px solid #ccc;
margin: 50px auto;
display: block;
}
</style>
</head>
<body>
<canvas id="c"> </canvas>
<script>
var MyCanvas = document.getElementById('c');
myContext = MyCanvas.getContext('2d');
myContext.fillStyle = '#080';
myContext.fillRect('0, 0, 100, 50');
</script>
</body>
</html>
The console is showing me this error message: Uncaught TypeError: Failed to execute 'fillRect' on 'CanvasRenderingContext2D': 4 arguments required, but only 1 present.