1 2 3 4 5 6 7 8
function myCustomFunction(n) { var a = 1; while (n > 0) { a = a * n; n--; } return a; }