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] 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);