how to add / remove class in javasvript

JavaScript
function removeClass() {
  var element = document.getElementById("myDIV");

    element.classList.remove("mystyle");
} 
Source

Also in JavaScript: