var mybuttons = document.getElementById('buttons').addEventListener('click', function(){
var myContext = context.clearRect(0,0, canvas.width, canvas.height);
}, false);
This is the code I have used to clear the canvas the button is created but it doesn't clear the canvas