web development war stories from the frontlines to the backend

This very simple function does exactly what the title suggests, it allows you to round to any specified accuracy. function roundTo(number, to) { return Math.round(number * to) / to; } alert(roundTo(1532, 100)); // 1500 alert(roundTo(26, 10)); // 30 If you want to get fancy, you could also modify the Number prototype for a more “integrated” [...]

Let me start off by saying I absolutely love Prototype. When a friend showed me how much it helped with writing cross-browser compatible code, I was an instant fan. Over the years of being a Prototype user I paid close attention to the many posts about why X is a better framework than Y. I [...]

  

Recent Posts

Categories

Archives