diff --git a/snippets/isAnagram.md b/snippets/isAnagram.md index c7fdceccd..a0caa785e 100644 --- a/snippets/isAnagram.md +++ b/snippets/isAnagram.md @@ -5,7 +5,7 @@ tags: string,regexp,intermediate Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters). -Use `String.toLowerCase()`, `String.prototype.replace()` with an appropriate regular expression to remove unnecessary characters, `String.prototype.split('')`, `Array.prototype.sort()` and `Array.prototype.join('')` on both strings to normalize them, then check if their normalized forms are equal. +Use `String.prototype.toLowerCase()`, `String.prototype.replace()` with an appropriate regular expression to remove unnecessary characters, `String.prototype.split('')`, `Array.prototype.sort()` and `Array.prototype.join('')` on both strings to normalize them, then check if their normalized forms are equal. ```js const isAnagram = (str1, str2) => { @@ -22,4 +22,4 @@ const isAnagram = (str1, str2) => { ```js isAnagram('iceman', 'cinema'); // true -``` \ No newline at end of file +```