Skip to content

Instantly share code, notes, and snippets.

@chichunchen
Created January 2, 2015 14:03
Show Gist options
  • Save chichunchen/f5f4b259de9d164644ff to your computer and use it in GitHub Desktop.
Save chichunchen/f5f4b259de9d164644ff to your computer and use it in GitHub Desktop.
javascript interpreter
There is a Javascript interpreter in the JavaScriptCore framework that comes with OS X. The interpreter is called jsc and can be found at the following path:
/System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc
There is a built-in function, quit(), which will exit interactive mode.
If you want to make it easier to use I suggest creating a symlink to a location in your path, e.g.:
sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc /usr/bin
This will put a symbolic link in /usr/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment