Off-topic, but here I go: Has anyone tried compiling Elm's compiler (written in Haskell) to JS (with ghcjs)? Are there any other small and approachable functional languages that are in-browser compilable and provide JS interop? I'd love to hack on a small Agent Based Modelling environment for the browser, comparable to what NetLogo[1] achieves in large on the desktop. Or maybe just make it a LISP?
Since you don't seem set on a language, let me throw my hump in for OCaml. It's supports a functional style without forcing you to use it for everything; js_of_ocaml compiles OCaml's dense, high-performance bytecode to Javascript that apparently integrates well with web APIs.
[1] https://ccl.northwestern.edu/netlogo