PS4 uses LLVM Clang, a compiler for C/C++ code, so the deal is to generate C from the JavaScript source, I know that emniscripten converts from C to LLVM, but I don't know about the other way, how bout' you do some research?
Or you could just use the browser to run your application