title: Compare String in javascript
body: <p>In jquery ajax function I recive to the server "true" or "false" strings. Then I only wnat know result but only get false in if condition.</p>
  
  <pre><code> $.ajax({
      ...
          success: function(result) {
                if(result == "true"){   // false???????
                      alert('true');
                  } else {
                      alert('false');
                  }
               }
          })
      ...
  </code></pre>
  
  <hr>
  
  <pre><code>$.ajax({
  ...
      success: function(result) {
            var result2 = String(result); 
            alert(result2);          // true
            alert(typeof result2);   // String
            alert(typeof "true");    // String
            if(result2 == "true"){   // false???????
                  alert('true');
              } else {
                  alert('false');
              }
           }
      })
  ...
  </code></pre>
  
  <p>...</p>
  
  <p>Somebody can help me?</p>