Little JavaScript hints, episode 2: stay DRY

Here’s a technique you can use to DRY (Don’t repeat yourself) up your code, if you have very similiar methods that just do the “opposite”. An example of this are controls that do scrolling or paging, and often include a forward/back button. I often see code like this: The “do something” part in methods like … Continue reading Little JavaScript hints, episode 2: stay DRY