Output JXA to stdout I have a small script made with JXA (JavaScript for Automation) that outputs a result to the shell with console.log.

However, console.log seems to output to stderr and I’d like to output to stdout. I can always 2&gt;&amp;1 when calling the script, but it would be preferable to output directly to stdout from the script.

Is there a way to accomplish that?
Found the solution: don’t use console.log or anything else. Instead of

console.log('something');


Simply

'something';


It will be output to stdout.