title: How does [...new set(array)] works in javascript?
body: <pre><code>const ages = [26, 27, 26, 26, 28, 28, 29, 29, 30]
  const uniqueAges = [...new Set(ages)]
  
  console.log(uniqueAges) // [26,27,28,29,30]
  </code></pre>
  <p>I know the Spread operator, and I search about set and I didn't find explain about how does it work.</p>
  <p>How the set Comparison of items and find similar items?
  If set use a loop in Comparison</p>
  <p>Any help is greatly appreciated</p>