To add a new class without overriding the previous one, we first have to add the classList property. We can then use it to access the add() method.
classList
add()
Make sure to pick . followed by classList and then ., add, (, ).
.
add
(
)