Remove class from all child elements JavaScript code example
Example: how to remove class in all siblings javascript
const setActive = el => {
[...el.parentElement.children].forEach(sib => sib.classList.remove('active'))
el.classList.add('active')
}