document.getElementById("container").classList.add("main");
const myElement = document.querySelector(".my-element"); myElement.classList.add("my-class");