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 4ed0342e..dd09a026 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -19,12 +19,14 @@ User.staticMethod(); // true That actually does the same as assigning it as a property directly: -```js +```js run class User() { } User.staticMethod = function() { alert(this === User); }; + +User.staticMethod(); // true ``` The value of `this` in `User.staticMethod()` call is the class constructor `User` itself (the "object before dot" rule).