Cancelling the execution of setInterval method (clearInterval)

Shows how to cancel the execution of JavaScript setInterval method using clearInterval method. Div element with id="colouredDiv" changes it's colour every 3 seconds. getRandomColour method generates random Hex colour code.