With OS X Xcode installed one can run ruby code in terminal with “>ruby somefile.rb” command (or from inside TextWrangler with the run command). You can also run a ruby interpreter from in terminal and type code in single lines while the interpreter retains variable objects.
Want same possibilities for Javascript. What must I install (if anything) on OS X to have that functionality? Not looking for an IDE as such just an interpreter that will run in Terminal.app?
I assume this is an allowed question for Stackoverflow based on other allowed questions about IDEs for various languages like:
What's a good IDE for Python on Mac OS X?
Node.js. It’s the V8 engine + libraries + REPL.
Although Node is usually used for web/network-related applications, at its core it’s just a plain JS engine and can even be used for shell scripting.
You can install it from the installer,
brewor just./configure && makefrom a Node.js’ tarball.There’s also Rhino.