title: Google Script comparing two spreadsheet cells
body: <p>I need some help for comparing 2 cells content with Google Script. 
  Basically I have email addresses in two columns of different spreadsheets and my script must act in different way if the addresses are equal or not. 
  When I launch an "if" cycle comparing the two cells the script never recognize that they are the same..
  I've tried with if(test=test1) and with if(test==test1) but it doesn't work. What should it be? Thanks!</p>
  
  <pre><code>for (var i = 0; i &lt; values.length; i++) {     
     if (values[i][1].length &gt; 0) {
        var test = valuesDB[1][2];
        var test1 = values[i][1];
        if (test==test1) {                       
           var Date = values[i][4];
           var Days = values[i][5];
           var comments = values[i][6]; }
  </code></pre>