I try to avoid repetition in my code as much as possible.
I know you can turn this:
variable = variable+2
into this
variable += 2
but how can I avoid repetition here? Surely there is a way...
this.className = this.className.replace("classname","")