Write a function named compareSets that receives 2 parameters.
setAsetBThe function should compare the 2 sets and return an Object with the following properties:
onlyA - a Set with all elements inside setA that are not part of setBonlyB - a Set with all elements inside setB that are not part of setAunion - a Set with all elements inside setA and setBsetA
=setB
=Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro