1var myElement = document.getElementById("myElementID");
2myElement.classList.add("style1 style2");
3myElement.classList.remove("style1 style2");
1// .classList method returns an array of the classes attached to the element it is called with.
2document.getElementById("myDIV").classList
3// It returns
4// [ 'className1', 'className2', ... ]