From 4e37135d2c349bf3a7b5fe8070a8e7d06d275993 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Wed, 22 Jan 2020 10:49:16 +0200 Subject: [PATCH] Update isAnagram.md --- snippets/isAnagram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +```