If you want, you can you can always use the Compile function and then use the llvm to asm.js compiler. I don't know anyone who has done this or how useful that would be.
You may also want to consider the EmbedCode function. https://reference.wolfram.com/language/ref/EmbedCode.html. That might be easier to use than APIFunction.
The only language I know that really does what you're talking about that people actually use is ClojureScript and even it is a partial implementation of Clojure. I guess people also use ASM.js as noted above. The other examples on the list are either toy or productivity related languages which were designed to higher level versions of Javascript or a compiler that supports too little of the language to be really useful. I guess this is part of the reason why llvm is so cool.