Skip to content

Commit 0c770c5

Browse files
authored
Translation of Comparison article (PR #18)
Translation of Comparison article
2 parents 1fb63b2 + fbf2db9 commit 0c770c5

File tree

3 files changed

+102
-103
lines changed

3 files changed

+102
-103
lines changed

1-js/02-first-steps/08-comparison/1-comparison-questions/solution.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
```js no-beautify
44
5 > 4true
5-
"apple" > "pineapple"false
5+
"ананас" > "яблуко"false
66
"2" > "12"true
77
undefined == nulltrue
88
undefined === nullfalse
99
null == "\n0\n"false
1010
null === +"\n0\n"false
1111
```
1212

13-
Some of the reasons:
13+
Ось чому такі результати:
1414

15-
1. Obviously, true.
16-
2. Dictionary comparison, hence false.
17-
3. Again, dictionary comparison, first char of `"2"` is greater than the first char of `"1"`.
18-
4. Values `null` and `undefined` equal each other only.
19-
5. Strict equality is strict. Different types from both sides lead to false.
20-
6. See (4).
21-
7. Strict equality of different types.
15+
1. Очевидно, 5 більше за 4. true.
16+
2. Посимвольне порівняння, тому `false`.
17+
3. Знову посимвольне порівняння. Перший символ рядка `"2"` більший за перший символ другого рядка — `"1"`.
18+
4. Спеціальний випадок. Значення `null` і `undefined` рівні під час не строгого порівняння.
19+
5. Строге порівняння різних типів, тому `false`.
20+
6. Дивіться (4).
21+
7. Строге порівняння різних типів.

1-js/02-first-steps/08-comparison/1-comparison-questions/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ importance: 5
22

33
---
44

5-
# Comparisons
5+
# Оператори порівняння
66

7-
What will be the result for these expressions?
7+
Який буде результат порівняння цих виразів?
88

99
```js no-beautify
1010
5 > 4
11-
"apple" > "pineapple"
11+
"ананас" > "яблуко"
1212
"2" > "12"
1313
undefined == null
1414
undefined === null

0 commit comments

Comments
 (0)