diff --git a/1-js/02-first-steps/09-comparison/article.md b/1-js/02-first-steps/09-comparison/article.md index a69317fee..a24af5688 100644 --- a/1-js/02-first-steps/09-comparison/article.md +++ b/1-js/02-first-steps/09-comparison/article.md @@ -212,5 +212,5 @@ Why did we go over these examples? Should we remember these peculiarities all th - Comparison operators return a boolean value. - Strings are compared letter-by-letter in the "dictionary" order. - When values of different types are compared, they get converted to numbers (with the exclusion of a strict equality check). -- The values `null` and `undefined` equal `==` each other and do not equal any other value. +- The values `null` and `undefined` are equal `==` to themselves and each other, but do not equal any other value. - Be careful when using comparisons like `>` or `<` with variables that can occasionally be `null/undefined`. Checking for `null/undefined` separately is a good idea. diff --git a/1-js/05-data-types/04-array/article.md b/1-js/05-data-types/04-array/article.md index e71e86a5b..629a7c77f 100644 --- a/1-js/05-data-types/04-array/article.md +++ b/1-js/05-data-types/04-array/article.md @@ -100,7 +100,7 @@ Let's say we want the last element of the array. Some programming languages allow the use of negative indexes for the same purpose, like `fruits[-1]`. -Although, in JavaScript it won't work. The result will be `undefined`, because the index in square brackets is treated literally. +However, in JavaScript it won't work. The result will be `undefined`, because the index in square brackets is treated literally. We can explicitly calculate the last element index and then access it: `fruits[fruits.length - 1]`. diff --git a/1-js/09-classes/06-instanceof/article.md b/1-js/09-classes/06-instanceof/article.md index f9db989ca..00aee3376 100644 --- a/1-js/09-classes/06-instanceof/article.md +++ b/1-js/09-classes/06-instanceof/article.md @@ -55,7 +55,7 @@ The algorithm of `obj instanceof Class` works roughly as follows: For example: ```js run - // setup instanceOf check that assumes that + // set up instanceof check that assumes that // anything with canEat property is an animal class Animal { static [Symbol.hasInstance](obj) { @@ -68,7 +68,7 @@ The algorithm of `obj instanceof Class` works roughly as follows: alert(obj instanceof Animal); // true: Animal[Symbol.hasInstance](obj) is called ``` -2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceOf Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain. +2. Most classes do not have `Symbol.hasInstance`. In that case, the standard logic is used: `obj instanceof Class` checks whether `Class.prototype` is equal to one of the prototypes in the `obj` prototype chain. In other words, compare one after another: ```js