title: Is array.sort() in-place even when operating on Object.keys()?
body: <p>The <code>.sort()</code> method of JavaScript arrays modifies the array in-place and returns a reference to the array.</p>
  
  <p><code>Object.keys(obj)</code> gets an array which contains all the keys of the object <code>obj</code>.</p>
  
  <p>In JavaScript, object keys are stated in the standards not to be in any specific order.</p>
  
  <p>So the two "rules" seem to conflict: "<code>array.sort()</code> is in-place" vs "Object keys are not ordered".</p>
  
  <p>When we call <code>Object.keys(obj).sort()</code> which of the following happens?</p>
  
  <ul>
  <li>The keys of the object were sorted in place and stay sorted if the object isn't modified?</li>
  <li>A temporary anonymous copy of the array of object keys is created and sorted?</li>
  <li>Something else?</li>
  </ul>
  
  <p><strong>Is this documented in the standard or does it vary by implementation?</strong></p>