AppsFlyer Interview Question

Given a random string, tell if there are duplicate characters in it.

Interview Answer

Anonymous

May 13, 2019

let str ="abcdefghaa".split('') //str to array let findDuplicates = (arr) => arr.filter((item, index) => arr.indexOf(item) != index) console.log(findDuplicates(str))