Clip is used to limits any future drawings to display only clips inside current paths, here clipa means a small piece or image that will be displayed only not full image.
var variableName = canvas.getContext(2d);
variableName.clip();
You can draw any number of rectagnle and also you can clear any area or rectangle.
Open notepad or any other text editor, follow the following points.
save file with name task.html or task.htm and then open it using any browser and see results.