title: Javascript error when create object and comparing fields
body: <p>I created a javascript object that i fill with data, When i return this object to anoother class and run the isError function on the object, i always get true, and i cant figure out why.  </p>
  
  <p>This is the new object i've created:  </p>
  
  <pre><code>function WSResponse()
  {
    this.error = new Object();
    this.isError = function()
    {
      if (this.error.status === '0')
      {
        return false;
      }
      else
      {
        return true;
      }
    }
  }
  </code></pre>
  
  <p>This is my service:  </p>
  
  <pre><code>...Some code.. 
  var wsresponse = new WSResponse();
  wsresponse.data = responseFromServer.ws_result;
  wsresponse.error.status='0';
  wsresponse.error.msg = responseFromServer.msg;
  return wsresponse;
  </code></pre>
  
  <p>And this is my controller:  </p>
  
  <pre><code>if (response.isError)
  {               
      $scope.isLoginError = true;
  }
  else
  {
      $scope.isLoginError = false;    
  }
  </code></pre>
  
  <p>From some reason i always get true, when i debug i can see the value is 0 or -1 (string)<br>
  What is the problem ?  </p>
  
  <p>Thanks</p>