how we can covert a string to boolean?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/263965/how-can-i-convert-a-string-to-boolean-in-javascript">How can I convert a string to boolean in JavaScript?</a>  </p>
</blockquote>



<p>I have a select list with 2 options in it, <code>yes</code> or <code>no</code>, something like:</p>

<pre><code>   &lt;select size="1"&gt;
     &lt;option value="true"&gt;yes&lt;/option&gt;
     &lt;option value="false"&gt;no&lt;/option&gt;
   &lt;/select&gt;
</code></pre>

<p>Now i want to use the selected value in the jquery-UI button disabled property , means :</p>

<pre><code>  $("button").button({ disabled : $("select").val() });
</code></pre>

<p>Now my problem is that the value which we will get by <code>$("select").val()</code> is <code>string</code> and for</p>

<p><code>disabled</code> property we need boolean. So i want to know that is there any method just like </p>

<p><code>pareInt</code> or <code>parseFloat</code> by which we can convert a string to boolean ?</p>
