In all the examples of new Set it shows how to convert array to set, add to set, etc and then shows what to expect when using console.log . Is there a difference with Google Apps Script? Seems so simple, not sure what Im missing?
function myFunction() {
let arr = ["one", "two", "three"]
let setTest = new Set(arr)
Logger.log(setTest)
// Output:
//Info {}
}
The following example shows how to create a new Set from an array.
let chars = new Set(['a', 'a', 'b', 'c', 'c']);
All elements in the set must be unique therefore the chars only contains 3 distinct elements a, b and c.
console.log(chars);
Output:
Set { 'a', 'b', 'c' }