What's the equivalent of "do shell script" with javascript automations? (Yosemite)

Support for javascript automations started with Yosemite.

How could I run using javascript an external command? (i.e. the equivalent of do shell script of applescript?


If you look in the StandardAdditions.sdef.

  1. Menubar menu: Windows -> Library
  2. Double click on: StandardAdditions
  3. Change the dropdown to Javascript.

You will see that many of the script command change to the camelHump syntax

enter image description here


app = Application.currentApplication()
app.includeStandardAdditions = true;

app.doShellScript('ls')

enter image description here