For example - I have just the next line of code, where I need to recorgonize if the span
have the some class
included that begins from the outcome--active
. And if so - delete it via JS
.
<span class="outcome___259Az outcome--active___1Ffc-"></span>
Any ideas how we can make it?
I had tried next, but it does not work:
document.querySelector('[class^="outcome"]').classList.remove(/outcome--active/g)