JSFiddle - React, Tailwind, and code Playground
by fxi
HTML
<canvas height="400" width="400" id="can1"></canvas>
JavaScript
var canvas = document.getElementById('can1');
var ctx = canvas.getContext('2d');
ctx.fillRect(50,50,50,50);
ctx.globalCompositeOperation = 'xor';
ctx.fillRect(75,75,50,50);