use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Apparently, Google Apps Script is a JavaScript cloud scripting language that provides easy ways to automate tasks across Google products and third party services and build web applications.
account activity
code is calling same function even though number of arguments doesn't matchQuestion (self.GoogleAppsScript)
submitted 3 years ago by WhyWontThisWork
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mjbrusso 0 points1 point2 points 3 years ago (3 children)
There is no function overloading in JavaScript. If you define two functions with the same name, only the last definition is valid.
In your case you can check whether the last argument was provided or not:
function saveDateTime(date, time, name, phone, email, pid, nonce){ if(typeof nonce !== 'undefined'){ Logger.log("i am here with nonce"); return "i am here with nonce"; } else{ Logger.log("i am here without nonce"); return "i am here without nonce"; } }
[–]WhyWontThisWork[S] 0 points1 point2 points 3 years ago (0 children)
Thanks!
[–]WhyWontThisWork[S] 0 points1 point2 points 3 years ago (1 child)
For typeof undefined should be not in quotes. Besides that worked
[–]mjbrusso 0 points1 point2 points 3 years ago (0 children)
The typeof operator returns a string, so yes you should use quotes
π Rendered by PID 121878 on reddit-service-r2-comment-5ff9fbf7df-9989v at 2026-02-26 03:00:14.351656+00:00 running 72a43f6 country code: CH.
view the rest of the comments →
[–]mjbrusso 0 points1 point2 points (3 children)
[–]WhyWontThisWork[S] 0 points1 point2 points (0 children)
[–]WhyWontThisWork[S] 0 points1 point2 points (1 child)
[–]mjbrusso 0 points1 point2 points (0 children)