To select element that does not have a specific class with JavaScript, we use the :not pseudoclass.
For instance, we write
const el = document.querySelector("li:not(.completed):not(.selected)");
to select the first li element that doesn’t have the completed class or selected class with the querySelector method with :not