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 73a22a79..b940e04c 100644 --- a/1-js/09-classes/03-static-properties-methods/article.md +++ b/1-js/09-classes/03-static-properties-methods/article.md @@ -49,8 +49,8 @@ class Article { // usage let articles = [ - new Article("Mind", new Date(2019, 1, 1)), - new Article("Body", new Date(2019, 0, 1)), + new Article("HTML", new Date(2019, 1, 1)), + new Article("CSS", new Date(2019, 0, 1)), new Article("JavaScript", new Date(2019, 11, 1)) ]; @@ -58,7 +58,7 @@ let articles = [ articles.sort(Article.compare); */!* -alert( articles[0].title ); // Body +alert( articles[0].title ); // CSS ``` Here `Article.compare` stands "over" the articles, as a means to compare them. It's not a method of an article, but rather of the whole class. @@ -171,7 +171,7 @@ rabbits[0].run(); // Black Rabbit runs with speed 5. Now we can call `Rabbit.compare` assuming that the inherited `Animal.compare` will be called. -How does it work? Again, using prototypes. As you might have already guessed, extends also gives `Rabbit` the `[[Prototype]]` reference to `Animal`. +How does it work? Again, using prototypes. As you might have already guessed, `extends` gives `Rabbit` the `[[Prototype]]` reference to `Animal`. ![](animal-rabbit-static.png) @@ -187,10 +187,10 @@ class Rabbit extends Animal {} // for static properties and methods alert(Rabbit.__proto__ === Animal); // true -// and the next step is Function.prototype +// the next step up leads to Function.prototype alert(Animal.__proto__ === Function.prototype); // true -// that's in addition to the "normal" prototype chain for object methods +// the "normal" prototype chain for object methods alert(Rabbit.prototype.__proto__ === Animal.prototype); ``` diff --git a/1-js/13-modules/02-import-export/article.md b/1-js/13-modules/02-import-export/article.md index 21ac6315..20bc4757 100644 --- a/1-js/13-modules/02-import-export/article.md +++ b/1-js/13-modules/02-import-export/article.md @@ -1,4 +1,3 @@ - # Export and Import Export and import directives are very versatile. diff --git a/8-web-components/3-shadow-dom/article.md b/8-web-components/3-shadow-dom/article.md index 3df479c0..fafc4754 100644 --- a/8-web-components/3-shadow-dom/article.md +++ b/8-web-components/3-shadow-dom/article.md @@ -98,7 +98,7 @@ alert(elem.shadowRoot.host === elem); // true Shadow DOM is strongly delimited from the main document: -1. Shadow DOM elements are not visible to `querySelector` from the light DOM. In particular, Shadow DOM elements may have ids that conflict with those in the light DOM. They be unique only within the shadow tree. +1. Shadow DOM elements are not visible to `querySelector` from the light DOM. In particular, Shadow DOM elements may have ids that conflict with those in the light DOM. They must be unique only within the shadow tree. 2. Shadow DOM has own stylesheets. Style rules from the outer DOM don't get applied. For example: diff --git a/9-regular-expressions/03-regexp-character-classes/article.md b/9-regular-expressions/03-regexp-character-classes/article.md index d7af1489..592448c7 100644 --- a/9-regular-expressions/03-regexp-character-classes/article.md +++ b/9-regular-expressions/03-regexp-character-classes/article.md @@ -263,7 +263,7 @@ Modern JavaScript allows to use these properties in regexps to look for characte - A cyrillic letter is: `pattern:\p{Script=Cyrillic}` or `pattern:\p{sc=Cyrillic}`. - A dash (be it a small hyphen `-` or a long dash `—`): `pattern:\p{Dash_Punctuation}` or `pattern:\p{pd}`. -- A currency symbol: `pattern:\p{Currency_Symbol}` or `pattern:\p{sc}`. +- A currency symbol, such as `$`, `€` or another: `pattern:\p{Currency_Symbol}` or `pattern:\p{sc}`. - ...And much more. Unicode has a lot of character categories that we can select from. These patterns require `'u'` regexp flag to work. More about that in the chapter [](info:regexp-unicode).