eval condition in javascript where the parameter type mismatch
<p>I have script</p>

<pre><code>&lt;script type="text/javascript"&gt;
   a = eval("dog!='cat'");
   document.write(a);
&lt;/script&gt;
</code></pre>

<p>It give's "dog is not defined".But i want true/false.
If i put,    </p>

<pre><code>    &lt;script type="text/javascript"&gt;
       a = eval("'dog'!='cat'");
       document.write(a);
    &lt;/script&gt;
</code></pre>

<p>It works.
But i cannot put quotes to dog because condition dynamically generated, can any one suggest any other way to do it.
Here cat have quotes,but dog don't have the quotes.</p>
