Ad
Strings
Code
Diff
  • isUnique = s => s.split("").filter((a,b,c) => c.indexOf(a) === b).length == s.length;
    
    • isUnique=s=>new Set(s).size==s.length
    • isUnique = s => s.split("").filter((a,b,c) => c.indexOf(a) === b).length == s.length;