So I have a button that toggles a simple dark theme for my web app.
<button class="btn btn-primary" onclick="dark_mode()">Dark Mode ON</button>
Once the user clicks it will activate this function in javascript.
function dark_mode() {
document.body.style.background = "#2C2F33";}
This will only change the background. I am wondering if the user clicks the button a second time it will revert the changes made by the function. (i.e toggle on/off) Thanks for the time and help in advance!
#FFFFFF(white)?