From 183d87b707a27b1ccc2134d28652680cf75a88d7 Mon Sep 17 00:00:00 2001 From: Space Invadev Date: Mon, 18 Nov 2019 12:50:57 -0500 Subject: [PATCH 1/3] Update solution.md Changed the reference to each item of the array since it was previously defined as the variable word. --- 1-js/05-data-types/07-map-set/02-filter-anagrams/solution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/05-data-types/07-map-set/02-filter-anagrams/solution.md b/1-js/05-data-types/07-map-set/02-filter-anagrams/solution.md index 4c8af1f2..16067518 100644 --- a/1-js/05-data-types/07-map-set/02-filter-anagrams/solution.md +++ b/1-js/05-data-types/07-map-set/02-filter-anagrams/solution.md @@ -36,7 +36,7 @@ Letter-sorting is done by the chain of calls in the line `(*)`. For convenience let's split it into multiple lines: ```js -let sorted = arr[i] // PAN +let sorted = word // PAN .toLowerCase() // pan .split('') // ['p','a','n'] .sort() // ['a','n','p'] From 4963fce5f73c5ffcbd5c10ea6d60831a226223cd Mon Sep 17 00:00:00 2001 From: Mauricio Paternina <49292621+spaceinvadev@users.noreply.github.com> Date: Wed, 20 Nov 2019 11:57:22 -0600 Subject: [PATCH 2/3] Fix SyntaxError When assigning the static method `staticMethod` to the `User` class, as a property directly, no parentheses should be used after `User`, since this leads to an error: `SyntaxError: Unexpected token '('`. For this reason, such parentheses have to be removed. --- 1-js/09-classes/03-static-properties-methods/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/09-classes/03-static-properties-methods/article.md b/1-js/09-classes/03-static-properties-methods/article.md index dd09a026..ab08f2de 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -20,7 +20,7 @@ User.staticMethod(); // true That actually does the same as assigning it as a property directly: ```js run -class User() { } +class User { } User.staticMethod = function() { alert(this === User); From 09f2aa667cd302cda3bb3aa28768773d9c876f10 Mon Sep 17 00:00:00 2001 From: Mauricio Paternina <49292621+spaceinvadev@users.noreply.github.com> Date: Wed, 20 Nov 2019 12:02:28 -0600 Subject: [PATCH 3/3] Update article.md --- 1-js/09-classes/03-static-properties-methods/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/09-classes/03-static-properties-methods/article.md b/1-js/09-classes/03-static-properties-methods/article.md index ab08f2de..dd09a026 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -20,7 +20,7 @@ User.staticMethod(); // true That actually does the same as assigning it as a property directly: ```js run -class User { } +class User() { } User.staticMethod = function() { alert(this === User);