add class js vanilla js code example Example: addclass js vanilla element.classList.add('className');