Create factorial.js

Computes the factorial of n