title: How to make a function that takes two sets with strings that returns the equivalent values? (Javascript)
body: <p>//EDIT: I'm using Codehs for this problem and it doesn't use filter or has'  </p>
  
  <p>function start(){</p>
  
  <pre><code>var gifts = ["book","car"]; 
  
  var presents = ["game","book"];
  
   var tim = new Set();
  
   var sally = new Set();
  
  tim.add(gifts);
  
  sally.add(presents);
  
    var ans = compare(tim,sally);
  
    println(ans);
  
  //should print in "book"
  }
  
  function compare(first,second){
  //code here
  }
  </code></pre>
  
  <p>I have tried looping over the elements and using union
  <code>set.union();</code>. I don't know where to approach the problem. Thank you!</p>