Merge pull request #97 from alxhghs/patch-2

Fixed typo - changed 'no any other value' to 'not'
This commit is contained in:
Ilya Kantor 2017-07-17 00:24:32 +03:00 committed by GitHub
commit d84cc42106

View file

@ -153,7 +153,7 @@ For a strict equality check `===`
``` ```
For a non-strict check `==` For a non-strict check `==`
: There's a special rule. These two are a "sweet couple": they equal each other (in the sense of `==`), but no any other value. : There's a special rule. These two are a "sweet couple": they equal each other (in the sense of `==`), but not any other value.
```js run ```js run
alert( null == undefined ); // true alert( null == undefined ); // true
@ -162,7 +162,7 @@ For a non-strict check `==`
For maths and other comparisons `< > <= >=` For maths and other comparisons `< > <= >=`
: Values `null/undefined` are converted to a number: `null` becomes `0`, while `undefined` becomes `NaN`. : Values `null/undefined` are converted to a number: `null` becomes `0`, while `undefined` becomes `NaN`.
Now let's see funny things that happen when we apply those rules. And, what's more important, how do not fall into a trap with these features. Now let's see funny things that happen when we apply those rules. And, what's more important, how to not fall into a trap with these features.
### Strange result: null vs 0 ### Strange result: null vs 0