Try NectarJS

Choose an example :
And a target :
Compile !
NectarJS is a cross-platform multi-purpose JavaScript compiler. You can write a JS program from your Android phone, and compile it for Linux or Windows, painless.


NectarJS is able to produce WebAssembly for your JavaScript code : no more need for obfuscation.

NectarJS is not finished yet and need more development.

Go to nectarjs.com

Furthermore, you can write IoT Firmware (ie Arduino) in full JS. A Blinking Led example firmware weight is 5kb.
Load Arduino example

Read the documentation