title: Can someone please explain why document["write"] works?
body: <p>I was helping to de-obfuscate a javascript snippet today, and was surprised to find this:</p>
  
  <pre><code>document["write"]('obfuscated code here');
  </code></pre>
  
  <p>The word "write" was also obfuscated, making it slightly harder to understand the code's intent.  </p>
  
  <p>I've never seen document treated as an array before, and I'm curious how/why this works.  Are there other functions that can be called in a similar manner?</p>