In this example, we check if the browser supports the classList.remove() method. If not, the regular expression works as a fallback to achieve the same result (for older browsers).
Click the button to remove the "mystyle" class from DIV.