Question

I've found some online interactive Javascript editors, but I wonder if there is a local equivalent as a gem that lets me test Javascript just like IRB and Rails console in Mac?

Was it helpful?

Solution

Try these:

OTHER TIPS

Mozilla provides Rhino shell. Please note that it is based on an open source version of JavaScript built on Java.

Edit:

Since you are on a mac, you can use jsc which should be installed in: /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc.

Found this little gem of info on this page.

Since Marcel Korpel has mentioned it as comment and might miss (I missed it first), entering it in here.

Fire up the console in Chrome/Firefox/Safari (Right click on the browser and say Inspect Element and look for Console tab) and start entering the commands that you wanna evaluate.

If you want to type multiple lines without each line being evaluated (like defining object/function), press SHIFT+Enter to go to next line (works in Chrome, have't checked in others)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top