Whatever message this page gives is out now! Go check it out!
set.isSubsetOf(otherSet)| Parameter | Description |
|---|---|
| otherSet | Potential superset. |
cfscript (syntax: set.isSubsetOf(otherSet)).
<cfscript>
setA = setNew();
setA.add(2);
setA.add(3);
setB = setNew();
setB.add(1);
setB.add(2);
setB.add(3);
setB.add(4);
writeOutput(setA.isSubsetOf(setB)); // true
writeOutput(setB.isSubsetOf(setA)); // false
</cfscript>
<cfscript>
function hasAllRequiredSkills(required any required, required any candidate) {
return required.isSubsetOf(candidate);
}
required = setNew();
required.add("A");
required.add("B");
candidate = setNew();
candidate.add("A");
candidate.add("B");
candidate.add("C");
writeOutput(hasAllRequiredSkills(required, candidate)); // true
</cfscript>