deduplicate array javascript code example
Example 1: js clone array
var clone = myArray.slice(0);
Example 2: js array clone
let clone = [...myArray]
Example 3: deduplicate array javascript
function uniq(a) {
return Array.from(new Set(a));
}