Factorial (faktorijel) funkcija
function factorialize(num) {
for (var i = num - 1; i > 0; i--) {
num *= i;
}
return num;
}
// Another one (mine)
function factorialize(num) {
var factor = 1;
for (var i = 1; i < num + 1; i++) {
factor *= i;
}
return factor;
}