title: How can I convert a string to boolean in JavaScript?
body: <p>Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript?</p>
  
  <p>I have a hidden form in HTML that is updated based upon a user's selection within a list. This form contains some fields which represent boolean values and are dynamically populated with an intrinsic boolean value. However, once this value is placed into the hidden input field it becomes a string.</p>
  
  <p>The only way I could find to determine the field's boolean value, once it was converted into a string, was to depend upon the literal value of its string representation.</p>
  
  <pre><code>var myValue = document.myForm.IS_TRUE.value;
  var isTrueSet = myValue == 'true';
  </code></pre>
  
  <p>Is there a better way to accomplish this?</p>