For some reason the parser breaks with that factorial definition, but adding spaces in between `a-1` seem to do the trick:
let fact a =
if a == 0 then
1
else
(fact (a - 1)) * a
console.log (fact 5)
Now, it's true that the Haskell syntax does not make that much sense if there is no partial application. I think that the variadic-arguments-are-always-allowed nature of JavaScript is not very compatible with partial application though.