title: Can J2V8 execute anonymous function?
body: <p>I'm trying to execute this piece of javascript code</p>
  
  <pre><code>(function() {
      var z = '';
      var b = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
      for (var i = 0; i &lt; b.length; i += 2) {
          z = z + parseInt(b.substring(i, i + 2), 16) + ',';
      }
      z = z.substring(0, z.length - 1);
      eval(eval('String.fromCharCode(' + z + ')'));
  })();
  </code></pre>
  
  <p>but I got this error: </p>
  
  <pre><code>undefined:1: ReferenceError: document is not defined
  </code></pre>
  
  <p>If I assign the function to a variable, I haven't neither error nor result.</p>
  
  <pre><code>var a = function() {
      var z = '';
      var b = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
      for (var i = 0; i &lt; b.length; i += 2) {
          z = z + parseInt(b.substring(i, i + 2), 16) + ',';
      }
      z = z.substring(0, z.length - 1);
      eval(eval('String.fromCharCode(' + z + ')'));
  };
  </code></pre>
  
  <p>Have you got any idea on how run this script with J2V8?
  Thank you in advance</p>