I have come across custom functions in Google apps script. It involves writing a function which return value after process.
How do I write the below IFS function using apps script
function ifs(args)
{
????
}
I now want to understand how the variable argumnets enabled custom functions to be created?
For example the ifs function takes variable number of arguments
IFS function
Evaluates multiple conditions and returns a value that corresponds to the first true condition.Sample Usage
IFS(A1>90, "A", A1>80, "B", A1>70, "C")
IFS({A1:A5} > 3, "bigger", {A1:A5} = 3, "equal")Syntax
IFS(condition1, value1, [condition2, value2, …])condition1 - The first condition to be evaluated. This can be a boolean, a number, an array, or a reference to any of those.
value1 - The returned value if condition1 is TRUE.
condition2, value2, … - Additional conditions and values if the first one is evaluated to be false.

