title: JXA Equivalent of With Administrator Privileges
body: <p>In AppleScript, you can do:</p>
  
  <pre><code>do shell script "echo 'I am (G)root'" with administrator privileges
  </code></pre>
  
  <p>Sorry. Anyway, a shell script can be run in JXA like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>var app = Application.currentApplication();
  app.includeStandardAdditions = true;
  app.doShellScript("echo I am not root :(");
  </code></pre>
  
  <p>However, there doesn't seem to be an equivalent of <code>with administrator privileges</code> in JXA. Is there one that I'm missing, or how else should I do it? And don't tell me to use sudo. It won't work.</p>