From 61bc426051b5eaf2b331ba39b5be6b42e605f1da Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sun, 4 Aug 2019 09:36:30 +0300 Subject: [PATCH] typo --- 1-js/05-data-types/03-string/article.md | 2 +- 1-js/08-prototypes/03-native-prototypes/article.md | 12 ++++++------ .../2-find-html-colors-6hex/solution.md | 4 ++-- .../2-find-html-colors-6hex/task.md | 2 +- .../21-regexp-unicode-properties/article.md | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/1-js/05-data-types/03-string/article.md b/1-js/05-data-types/03-string/article.md index e20bc2e0..fb1f9b23 100644 --- a/1-js/05-data-types/03-string/article.md +++ b/1-js/05-data-types/03-string/article.md @@ -86,7 +86,7 @@ Here's the full list: |`\\`|Backslash| |`\t`|Tab| |`\b`, `\f`, `\v`| Backspace, Form Feed, Vertical Tab -- kept for compatibility, not used nowadays. | -|`\xXX`|Unicode character with the given hexadimal unicode `XX`, e.g. `'\x7A'` is the same as `'z'`.| +|`\xXX`|Unicode character with the given hexadecimal unicode `XX`, e.g. `'\x7A'` is the same as `'z'`.| |`\uXXXX`|A unicode symbol with the hex code `XXXX` in UTF-16 encoding, for instance `\u00A9` -- is a unicode for the copyright symbol `©`. It must be exactly 4 hex digits. | |`\u{X…XXXXXX}` (1 to 6 hex characters)|A unicode symbol with the given UTF-32 encoding. Some rare characters are encoded with two unicode symbols, taking 4 bytes. This way we can insert long codes. | diff --git a/1-js/08-prototypes/03-native-prototypes/article.md b/1-js/08-prototypes/03-native-prototypes/article.md index 7c116fda..66be00ca 100644 --- a/1-js/08-prototypes/03-native-prototypes/article.md +++ b/1-js/08-prototypes/03-native-prototypes/article.md @@ -36,7 +36,7 @@ alert(obj.__proto__ === Object.prototype); // true // obj.toString === obj.__proto__.toString == Object.prototype.toString ``` -Please note that there is no additional `[[Prototype]]` in the chain above `Object.prototype`: +Please note that there is no more `[[Prototype]]` in the chain above `Object.prototype`: ```js run alert(Object.prototype.__proto__); // null @@ -46,9 +46,9 @@ alert(Object.prototype.__proto__); // null Other built-in objects such as `Array`, `Date`, `Function` and others also keep methods in prototypes. -For instance, when we create an array `[1, 2, 3]`, the default `new Array()` constructor is used internally. So the array data is written into the new object, and `Array.prototype` becomes its prototype and provides methods. That's very memory-efficient. +For instance, when we create an array `[1, 2, 3]`, the default `new Array()` constructor is used internally. So `Array.prototype` becomes its prototype and provides methods. That's very memory-efficient. -By specification, all of the built-in prototypes have `Object.prototype` on the top. Sometimes people say that "everything inherits from objects". +By specification, all of the built-in prototypes have `Object.prototype` on the top. That's why some people say that "everything inherits from objects". Here's the overall picture (for 3 built-ins to fit): @@ -122,7 +122,7 @@ String.prototype.show = function() { During the process of development, we may have ideas for new built-in methods we'd like to have, and we may be tempted to add them to native prototypes. But that is generally a bad idea. ```warn -Prototypes are global, so it's easy to get a conflict. If two libraries add a method `String.prototype.show`, then one of them will be overwriting the other. +Prototypes are global, so it's easy to get a conflict. If two libraries add a method `String.prototype.show`, then one of them will be overwriting the method of the other. So, generally, modifying a native prototype is considered a bad idea. ``` @@ -144,7 +144,7 @@ if (!String.prototype.repeat) { // if there's no such method // actually, the code should be a little bit more complex than that // (the full algorithm is in the specification) - // but even an imperfect polyfill is often considered good enough + // but even an imperfect polyfill is often considered good enough for use return new Array(n + 1).join(this); }; } @@ -161,7 +161,7 @@ That's when we take a method from one object and copy it into another. Some methods of native prototypes are often borrowed. -For instance, if we're making an array-like object, we may want to copy some array methods to it. +For instance, if we're making an array-like object, we may want to copy some `Array` methods to it. E.g. diff --git a/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/solution.md b/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/solution.md index ec871d05..4e85285b 100644 --- a/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/solution.md +++ b/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/solution.md @@ -1,6 +1,6 @@ -We need to look for `#` followed by 6 hexadimal characters. +We need to look for `#` followed by 6 hexadecimal characters. -A hexadimal character can be described as `pattern:[0-9a-fA-F]`. Or if we use the `i` flag, then just `pattern:[0-9a-f]`. +A hexadecimal character can be described as `pattern:[0-9a-fA-F]`. Or if we use the `i` flag, then just `pattern:[0-9a-f]`. Then we can look for 6 of them using the quantifier `pattern:{6}`. diff --git a/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/task.md b/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/task.md index 1960a09c..80ed625f 100644 --- a/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/task.md +++ b/9-regular-expressions/07-regexp-quantifiers/2-find-html-colors-6hex/task.md @@ -1,6 +1,6 @@ # Regexp for HTML colors -Create a regexp to search HTML-colors written as `#ABCDEF`: first `#` and then 6 hexadimal characters. +Create a regexp to search HTML-colors written as `#ABCDEF`: first `#` and then 6 hexadecimal characters. An example of use: diff --git a/9-regular-expressions/21-regexp-unicode-properties/article.md b/9-regular-expressions/21-regexp-unicode-properties/article.md index 90855099..2bb031d7 100644 --- a/9-regular-expressions/21-regexp-unicode-properties/article.md +++ b/9-regular-expressions/21-regexp-unicode-properties/article.md @@ -34,7 +34,7 @@ For the full Unicode Character Database in text format (along with all propertie There are also other derived categories, like: - `Alphabetic` (`Alpha`), includes Letters `L`, plus letter numbers `Nl` (e.g. roman numbers Ⅻ), plus some other symbols `Other_Alphabetic` (`OAltpa`). -- `Hex_Digit` includes hexadimal digits: `0-9`, `a-f`. +- `Hex_Digit` includes hexadecimal digits: `0-9`, `a-f`. - ...Unicode is a big beast, it includes a lot of properties. For instance, let's look for a 6-digit hex number: