Factorialize a Number. Why I can't go further?

var factorial = 1;
var i;

function factorialize(num) {
for(i = 1; i <= num; i++ ){
factorial *= i;
}

return factorial;
}

factorialize(10);

Don’t use global variables.

Thanks. Its helped me!!!