Using Math object to shorten scripts
Christian Heilmann talks of using the Math object in JavaScript in some very nice ways. In particular, using the min and max methods to save extraneous if/else logic and even normalising property values like scrollTop.