-
-
Save chichunchen/f5f4b259de9d164644ff to your computer and use it in GitHub Desktop.
javascript interpreter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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