onClick back to default

Hi,

I have an onClick event triggred. And I want to set it back to default by a second click. How do I do it?
In my code, by clicking the button, the background turns blue. On second click I want to set it back to white.
My code is here

Thank you very much in advance,

Sven

You can use the classList.toggle to toggle the class of the element.

document.getElementById("check").classList.toggle("blue");