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.

Published June 28, 2007
Categorized as Quick Links
Short URL: https://snook.ca/s/829

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested?
Get in touch.