JavaScript interpreter implementation at Module:User:Cscott/LuaTurtle which is a bundled version of the code at lua-turtle.
The User:cscott/LuaTurtle
module evaluates JavaScript:
{{#invoke:User:Cscott/LuaTurtle|eval|1=1+2}}
Result: 3
{{#invoke:User:Cscott/LuaTurtle|eval|(function fact(x) { return (x<2) ? x : (x * fact(x-1)); })(42)}}
Result: 1405006117752879788779635797590784832178972610527232
It can also evaluate a code module in a separate page. This evaluates the JavaScript source code at /JsCode and returns it; note that the result is wikitext and can contain links and other markup:
{{#invoke:User:Cscott/LuaTurtle|eval|1={{User:Cscott/LuaTurtle/JsCode}}}}
Result: 1405006117752879788779635797590784832178972610527232
{"b":"\n","a":[1,2,3]}