title: Cant seem to pass more than one parameter from JS to HTML in Google Web App Script
body: <p>I am learning how to create a very basic Google Web App ,trying to grab 2 variables from a function (a fisrt name and surname from a google sheet) and return them to the HTML code to display on my page.  It works grabbing just one variable but when I try returning 2 it all gets messed up.  Any help would be very much appreciated.</p>
  
  <p>My JS code:</p>
  
  <pre><code>function doGet() {
  
    return HtmlService.createHtmlOutputFromFile('Index')
        .setSandboxMode(HtmlService.SandboxMode.IFRAME);
  };
  
  function grabUser(){
  
    var userEmail = Session.getActiveUser().getEmail();
    var SpreadsheetId = '1xxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxx'; 
    var SheetName = 'MASTER';
    var EmailCol = 7; //keep not that column A=0, B=1...
    var FNameCol = 1;
    var SNameCol = 0;
  
     // Log the email address of the person running the script.
  Logger.log(userEmail);
  
    var ss = SpreadsheetApp.openById(SpreadsheetId);
    var sheet = ss.getSheetByName(SheetName);
  
    var data = sheet.getDataRange().getValues(); // read all data in the sheet 
  
    for(n=0;n&lt;data.length;++n){ // iterate row by row and examine data in col 
   if(data[n][EmailCol].toString()==userEmail){ var FName = data[n][FNameCol];
                                              var SName =data[n][SNameCol]};// return the values of these cells 
   }
    Logger.log(FName);
    Logger.log(SName);
  
  return (FName, SName);
  
  };
  </code></pre>
  
  <p>and then my HTML:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;base target="_top"&gt;
      &lt;script&gt;
        function onSuccess(FName,SName) {
          var div = document.getElementById('output');
          div.innerHTML = 'Hello ' + FName + 
             ' Your surname is '+SName;
        }
  
        google.script.run.withSuccessHandler(onSuccess).grabUser();
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="output"&gt;&lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>