1. Write a function called dedupe which accepts an array of integers and returns a new array with all duplicates removed code example
Example 1: javascript remove duplicates from array
var myArr = [1, 2, 2, 2, 3];
var mySet = new Set(myArr);
myArr = [...mySet];
console.log(myArr);
// 1, 2, 3
Example 2: remove duplicates from array javascript
arr.filter((v,i,a)=>a.findIndex(t=>(t.place === v.place && t.name===v.name))===i)