Friday, April 20, 2012

Javascript from the command line 2

I already wrote about this here: Javascript from command-line on Mac OS X.
Here is another tip.
The console.log() is not available for jsc, and you have to use the debug() API.
In order to keep using the console.log() calls just define:
var console = {log:function(msg){debug(msg);}}

Enjoy,
Alex

No comments: