Solution for "classlist remove if exists"

let el = document.getElementById('container'); //remove class el.classList.remove('first'); //remove class el.classList.add('first');

es6 add and remove class

Similar codes for "classlist remove if exists"


Latest 'Javascript' questions

Added before "classlist remove if exists"