Javascript as command line callable scripting language

前端 未结 6 395
野趣味
野趣味 2021-01-14 17:42

I\'m looking for a way to write some simple scripts in javascript, like I would in ruby. For example, I might write a script like:

var str = \"Hello World\"         


        
6条回答
  •  感情败类
    2021-01-14 18:05

    As mentioned in this previous question, you might want to check out Rhino, an implementation of Javascript written in Java. Specifically, the page on the JavaScript shell might be of interest.

    Hope this helps.

提交回复
热议问题