For a set of strings, I would just use a object with the value true.
var obj = {};
obj["foo"] = true;
obj["bar"] = true;
if(obj["foo"])
{
// foo in set
}
This is basically how HashSet works in Java, assuming the JavaScript object is implemented as a hashtable (which is typical).