title: Map() function not giving expected results Google script
body: <p>I am trying to learn how to use Map(), in the function below Method1, the function runs i.e it executes and does not throw an error but it does not change any cell values equal to <code>Networking - 1</code> to <code>1</code> it leaves the data unchanged</p>
  <p>I am not understanding what is not working.</p>
  <pre><code>function Method1() {
    var ss     = SpreadsheetApp.getActiveSpreadsheet();  
    var sheet  = ss.getSheetByName('Elements');  
    var rng    = sheet.getDataRange();
    var values = rng.getValues();
    
    values = values.map(x =&gt; {return x = (x==&quot;Networking - 1&quot; ) ? 1: x;});
  
    sheet.getRange(1,1, values.length, values[0].length).setValues(values);
  }
  </code></pre>