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