Code quality improvement

This commit is contained in:
Angelos Chalaris
2018-02-19 15:53:50 +02:00
parent cd4fcb1776
commit 6f2fafce59
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ Use `String.toLowerCase()`, `String.replace()` with an appropriate regular expre
const isAnagram = (str1, str2) => {
const normalize = str => str.toLowerCase().replace(/[^a-z0-9]/gi, '').split('').sort().join('');
return normalize(str1) === normalize(str2);
}
};
```
```js