Iterate over set and remove element if it is in another set and return array – Javascript
I am not sure what I am missing from my function here to remove elements in a a set. It seems the loop is not working as expected. If you have a more optimal solution O(1), please share. Thanks! const…