1var canvas = document.getElementById("myCanvasID");
2var context = canvas.getContext('2d');
3context.clearRect(0, 0, canvas.width, canvas.height); //clear html5 canvas
1const context = canvas.getContext('2d');
2
3context.clearRect(0, 0, canvas.width, canvas.height);
1var canvas = document.getElementById('myCanvas');
2var context = canvas.getContext('2d');
3context.clearRect(0, 0, canvas.width, canvas.height);