I have a function on my site that takes a array of email strings and removes any duplicates. But it doesn't work on ie because of my use of the Array.from method. How can I convert to following code to work on ie?
let emailsListArray = ['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]'];
Array.prototype.unique = function() {
return Array.from(new Set(this));
}
emailsListArray = emailsListArray.unique();
console.log(emailsListArray);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>