title: Why does gmail use eval?
body: <p>This <a href="https://stackoverflow.com/questions/9089532/why-does-eval-exist">question</a> suggests that using <code>eval</code> is a bad practice and many other questions suggest that it is 'evil'.</p>
  
  <p>An answer to the question suggests that using eval() could be helpful in one of these cases:</p>
  
  <blockquote>
    <ul>
    <li>Evaluate code received from a remote server. (Say you want to make a site that can be remotely controlled by sending JavaScript code to it?)</li>
    <li>Evaluate user-written code. Without eval, you can't program, for
    example, an online editor/REPL.</li>
    <li>Creating functions of arbitrary length dynamically (function.length
    is readonly, so the only way is using eval).</li>
    <li>Loading a script and returning it's value. If your script is, for
    example, a self-calling function, and you want to evaluate it and get
    it's result (eg: my_result = get_script_result("foo.js")), the only
    way of programming the function get_script_result is by using eval
    inside it.</li>
    <li>Re-creating a function in a different closure.</li>
    </ul>
  </blockquote>
  
  <p>While looking at the <a href="https://accounts.google.com/SignUp?service=mail&amp;continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fpc%3Dcarousel-about-en" rel="nofollow noreferrer">Google Accounts page</a> Source code I've found this:</p>
  
  <pre><code>(function(){eval('var f,g=this,k=void 0,p=Date.now||function(){return+new Date},q=function(a,b,c,d,e){c=a.split("."),d=g,c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(;c.length&amp;&amp;(e=c.shift());) [a lot of code...] q("botguard.bg.prototype.invoke",K.prototype.ha);')})()&lt;/script&gt;
  </code></pre>
  
  <p>I just can't get how is this helpful as it does not match any of the above cases. A comment there says:</p>
  
  <pre><code> /* Anti-spam. Want to say hello? Contact (base64)Ym90Z3VhcmQtY29udGFjdEBnb29nbGUuY29tCg== */
  </code></pre>
  
  <p>I can't see how eval would be used as anti-spam . Can somebody tell me why is it used in this specific case?</p>