1 let arr = [1, 2, 3, 10, 4, 5, 1, 3, 5]; 2 let stateNumArr = arr.filter((item, index, array) => { 3 return array.indexOf(item) === index; 4 }); 5 console.log(stateNumArr);
1 let arr = [1, 2, 3, 10, 4, 5, 1, 3, 5]; 2 let stateNumArr = arr.filter((item, index, array) => { 3 return array.indexOf(item) === index; 4 }); 5 console.log(stateNumArr);