When comparing F# (via FunScript) vs Js_of_ocaml, the Slant community recommends Js_of_ocaml for most people. In the question“What are the best languages that compile to JavaScript? ” Js_of_ocaml is ranked 33rd while F# (via FunScript) is ranked 36th. The most important reason people chose Js_of_ocaml is:
Js_of_ocaml brings all OCaml features to Javascript: static typing, type inference, modules, functional programming style...
Ranked in these QuestionsQuestion Ranking
Pros
Pro Easier transition from other paradigms
Since F# is not a purely functional language, it lends itself to being more easily picked up by programmers that have experience with other paradigms.
Pro Concise syntax
F#'s syntax tends to be terse while remaining very readable and easy to understand without being a chore to write.
Pro Runs on the CLR
Since F# runs on the Common Language Runtime or CLR, it has access to the entire .NET Framework, as well as libraries written in other .NET languages such as C#, VB.NET, and C++/CLI.
Pro All OCaml features
Js_of_ocaml brings all OCaml features to Javascript: static typing, type inference, modules, functional programming style...
Cons
Con Not really cross platform
Though the community sites are touting F# can be cross platform through use of Mono, the reality is that it is more of a hack to replay on larger mono applications in production.
Con Documentation
Documentation is still scarce