Return to Blog entry
or
fizzbuzz = function (n,divisor,word) { return (n%divisor[ 1 ]?"":word[ 1 ]) + (n%5?"":'buzz')||n }
Every software system has multiple axes of change. Good programmers write code that is easy to change.
Parameterisation is the most powerful way to provide easy ways to change a system.