84 Flashcards

(1 cards)

1
Q

How to toggle between adding and removing a token (for example a class)

A

element.classList.toggle(‘active’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly