diff --git a/1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md b/1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md index a86a9f73..632b1cf4 100644 --- a/1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md +++ b/1-js/02-first-steps/09-comparison/1-comparison-questions/solution.md @@ -14,7 +14,7 @@ Some of the reasons: 1. Obviously, true. 2. Dictionary comparison, hence false. `"a"` is smaller than `"p"`. -3. Again, dictionary comparison, first char of `"2"` is greater than the first char of `"1"`. +3. Again, dictionary comparison, first char `"2"` is greater than the first char `"1"`. 4. Values `null` and `undefined` equal each other only. 5. Strict equality is strict. Different types from both sides lead to false. 6. Similar to `(4)`, `null` only equals `undefined`. diff --git a/1-js/02-first-steps/09-comparison/article.md b/1-js/02-first-steps/09-comparison/article.md index a323dc93..60becc4a 100644 --- a/1-js/02-first-steps/09-comparison/article.md +++ b/1-js/02-first-steps/09-comparison/article.md @@ -9,9 +9,9 @@ In JavaScript they are written like this: - Equals: `a == b`, please note the double equality sign `==` means the equality test, while a single one `a = b` means an assignment. - Not equals. In maths the notation is , but in JavaScript it's written as a != b. -In this article we'll learn more about different types of comparisons, how JavaScript makes them, including important peculiarities. +In this article we'll learn more about different types of comparisons, how JavaScript makes them, including important peculiarities. -At the end you'll find a good recipe to avoid "javascript quirks"-related issues. +At the end you'll find a good recipe to avoid "JavaScript quirks"-related issues. ## Boolean is the result @@ -57,7 +57,7 @@ The algorithm to compare two strings is simple: 4. Repeat until the end of either string. 5. If both strings end at the same length, then they are equal. Otherwise, the longer string is greater. -In the examples above, the comparison `'Z' > 'A'` gets to a result at the first step while the strings `"Glow"` and `"Glee"` are compared character-by-character: +In the examples above, the comparison `'Z' > 'A'` gets to a result at the first step while the strings `'Glow'` and `'Glee'` are compared character-by-character: 1. `G` is the same as `G`. 2. `l` is the same as `l`.