[JS] switch css style for element

I am trying to find a way to dynamically change the of a certain element. The tutorials i’ve found however all focus on changing one aspect of the style like *thing.style.left = “100px”;.
*What i want to do is switch between styles which are defined in my css. Is this even possible? Thanks.