I m Trying to remove the duplicate date from an array of Date like
let dates = ["date1","date2","date1","date3"];
I convert dates into Set but it's doesn't remove duplicate, but when I try it with other datatypes instead of Date in work, Where is the problem?
let uniq = dates => [...new Set(dates)];
date1and the others are simple dates like2018-06-07 11:42?===each other if they were created separately. If you want to deduplicate like that, you could convert the dates to timestamps first