Javascript as command line callable scripting language

前端 未结 6 387
野趣味
野趣味 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条回答
  •  梦毁少年i
    2021-01-14 18:01

    Why do you want to do this in javascript? Why not use a language that is suitable for this type of command line environment such as Perl? Javascript's main purpose is to faciltate client-side browser control.

提交回复
热议问题