title: Spread Operator equivalent in IE - Javascript
body: <p>I have a javascript function to populate dropdowns for individual table rows like:</p>
  
  <pre><code>$scope.possibleOptions = getUniqueValues($scope.yypeOptions, 'yypeOption')
      .map(function(id) {
              return {
                  id: id,
                  name: id
              });
  
  function getUniqueValues(array, prop) {
      return [...new Set(array.map(item =&gt; item[prop]))];
  }
  </code></pre>
  
  <p>where, <code>$scope.yypeOptions</code> is:</p>
  
  <pre><code>$scope.yypeOptions = [{
      yypeOption: "option1"
  }, {
      yypeOption: "option2"
  }];
  </code></pre>
  
  <p>I now have to make it compatible to IE. The <code>spread</code> and <code>=&gt;</code> operator is something I have to replace.</p>
  
  <p>Went through <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax" rel="noreferrer">this</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="noreferrer">this</a> link. But I could not get any understanding how to replace the Set inside an Array feature.</p>