Wednesday, June 27, 2018

Remove duplicate record from Javascript Array in ES6

There are many way's to implement it but ES6 make it so cool.
Let see how: 

let arr = [1, 2, 2, 3, 4];
let distinctArray = new Set(arr);

No comments:

Post a Comment