检查集合中是否存在值

要检查集合中是否存在给定值,请使用 .has() 方法:

mySet.has(someVal);

如果 someVal 出现在集合中,则返回 true,否则返回 false。