title: Is there a way to compare two strings where select and value are different types?
body: <p>I'm having some problems to compare two strings in jQuery:</p>
  
  <pre><code>var option = "";
  $.each(data, function(key, value) {
     option += "&lt;option ";
     if(selected == value) {
        option += "selected";
     }
     option += "&gt;" + value + "&lt;/option&gt;";
  });
  </code></pre>
  
  <p>selected and value are the same strings.</p>
  
  <p>Is there an another way to compare two strings or could it be, that selected and value are different types?</p>