Combine the methods according to their usability.
ClassList
Methods Usability
Report a typo
Match the items from left and right columns
Removes the class if the element contains it, and adds it otherwise.
Replaces a class with another class.
Adds one or more classes to the element.
Removes one or more classes from the element.
Returns true if the element has the specified class, false otherwise .
add()
contains()
toggle()
replace()
remove()
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.