Cancelling the execution of setInterval method (clearInterval)

Cancelling the execution of setInterval method (clearInterval)

BY 06 Nov 2015 Web Code Snippet
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.
Written by