The perennial favorite in javascript logic.