Write JavaScript program to find factorial of a number