Skip to content

Instantly share code, notes, and snippets.

@rubenlozano
Last active July 26, 2021 13:39
Show Gist options
  • Save rubenlozano/4521689 to your computer and use it in GitHub Desktop.
Save rubenlozano/4521689 to your computer and use it in GitHub Desktop.
Running JavaScript in OS X terminal
There is a javascript console, called JSC, in:
/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc
JSC is not in the shell PATH by default, to fix that:
$ sudo ln /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc /usr/local/bin
Note that you'll have to use debug() instead of the conventional console.log() in your script to see any output.
@due-nguyen
Copy link

JavaScript is not built-in Mac OS by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment