Sets and data structures in Google Apps Script
Google Apps Script runs on Rhino. Rhino is fairly behind the times, it's about ECMAScript 5.1 level. Don't expect to have any ES6 features such as sets or arrow functions.
There is an open issue about Set in Rhino's GitHub repo. But even if it's implemented, it's not a given that Google would deploy the new version of Rhino on their servers.