0
votes

I was trying just if/else in google app script. The following code should give "arun" as output, but its showing "prakash" . What's wrong with my code?

URL : https://script.google.com/macros/s/AKfycbzNYCFOofexc4AuA58M0yK6amiA0xcuAYuEJBbsRNgT7f7bD3AE/exec?queryString=arun

function doGet(request){
   if(request.queryString=="arun"){
      return HtmlService.createHtmlOutput("arun");
  }else{
   return HtmlService.createHtmlOutput("prakash");
   }
  }
1

1 Answers

2
votes

You forgot to check within the parameters, request.parameter.queryString.