DEV Community

Discussion on: A classic interview question

Collapse
 
dbenchi profile image
David BENCHI

const isAnagram = (str1, str2) =>
[...str1].sort().join("") === [...str2].sort().join("");