In a spreadsheet formula, you can construct an embedded array using curly braces. Semi-colons are row delimiters; commas (or backslashes in locales that use a comma for the decimal separator) are column delimiters.
Now when such embedded arrays are passed to Google Apps Script, they are converted to a 2-dimensional Javascript array, just like referenced ranges are.
So:
=myFunc({1,2})
=myFunc({1;2})
function myFunc(value)
{
}
In the first formula, value
will be [[1, 2]]
. In the second, it will be [[1], [2]]
.