added factorial specs and javascript