サブ fac.js Last modified: Mar 25, 2004 function fac(n) { var i var retv = 1 for (i = 1; i <= n; i++) { retv *= i } return retv }