Hey,
What am I getting wrong here? The event listener isn’t running for some reason.
Thanks
const toggle = document.querySelector('.toggle');
const item = document.querySelector('.item');
toggle.addEventListener('onClick', () => {
if (item.classList.contains('active')) {
item.classList.remove('active');
} else {
item.classList.add('active');
}
});