I wonder how hard it would be to make JS compile to Erlang like Elixir. I think the big problem would be some kind of actor model in the browser with everything callback based. Other than that, they're both dynamically typed, functional (Erlang obviously more) languages.