Skip to content

Commit e3da22b

Browse files
committed
Merge branch 'master' into 9-regular-expressions_05-regexp-character-sets-and-ranges-article_md_ru
2 parents 42839bf + bc329bd commit e3da22b

File tree

189 files changed

+3721
-3733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+3721
-3733
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 66 additions & 66 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
In the code below, each line corresponds to the item in the task list.
1+
В коде ниже каждая строка решения соответствует одному элементу в списке задач.
22

33
```js run
4-
let admin, name; // can declare two variables at once
4+
let admin, name; // можно объявить две переменные через запятую
55

6-
name = "John";
6+
name = "Джон";
77

88
admin = name;
99

10-
alert( admin ); // "John"
10+
alert( admin ); // "Джон"
1111
```
1212

1-js/02-first-steps/04-variables/1-hello-variables/task.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ importance: 2
22

33
---
44

5-
# Working with variables
5+
# Работа с переменными
66

7-
1. Declare two variables: `admin` and `name`.
8-
2. Assign the value `"John"` to `name`.
9-
3. Copy the value from `name` to `admin`.
10-
4. Show the value of `admin` using `alert` (must output "John").
7+
1. Объявите две переменные: `admin` и `name`.
8+
2. Запишите строку `"Джон"` в переменную `name`.
9+
3. Скопируйте значение из переменной `name` в `admin`.
10+
4. Выведите на экран значение `admin`, используя функцию `alert` (должна показать "Джон").
11+
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
First, the variable for the name of our planet.
1+
1. Переменная для названия нашей планеты.
22

3-
That's simple:
3+
Пример:
44

55
```js
6-
let ourPlanetName = "Earth";
6+
let ourPlanetName = "Земля";
77
```
88

9-
Note, we could use a shorter name `planet`, but it might be not obvious what planet it refers to. It's nice to be more verbose. At least until the variable isNotTooLong.
9+
Обратите внимание, мы могли бы использовать короткое имя `planet`, но тогда будет непонятно о какой планете мы говорим. Лучше описать содержимое переменной подробнее. По крайней мере до тех пор пока имя переменной неСтанетСлишкомДлинным.
1010

11-
Second, the name of the current visitor:
11+
2. Имя текущего посетителя:
1212

1313
```js
14-
let currentUserName = "John";
14+
let currentUserName = "Джон";
1515
```
1616

17-
Again, we could shorten that to `userName` if we know for sure that the user is current.
17+
Опять же, мы могли бы укоротить название до `userName`, если мы точно знаем, что это текущий пользователь.
1818

19-
Modern editors and autocomplete make long variable names easy to write. Don't save on them. A name with 3 words in it is fine.
19+
Современные редакторы и автодополнение ввода в них позволяют легко писать длинные названия переменных. Не экономьте буквы. Имена, состоящие из трех слов, вполне нормальны.
2020

21-
And if your editor does not have proper autocompletion, get [a new one](/code-editors).
21+
Если в вашем редакторе нет автодополнения, воспользуйтесь [другими](/code-editors).

1-js/02-first-steps/04-variables/2-declare-variables/task.md

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

33
---
44

5-
# Giving the right name
5+
# Придумайте правильные имена
66

7-
1. Create a variable with the name of our planet. How would you name such a variable?
8-
2. Create a variable to store the name of a current visitor to a website. How would you name that variable?
7+
1. Создайте переменную для названия нашей планеты. Как бы вы её назвали?
8+
2. Создайте переменную для хранения имени текущего посетителя сайта. Как бы вы назвали такую переменную?
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
We generally use upper case for constants that are "hard-coded". Or, in other words, when the value is known prior to execution and directly written into the code.
1+
Обычно мы используем буквы в верхнем регистре для констант, которые "жестко закодированы". Или, другими словами, когда значение известно до выполнения скрипта и записывается непосредственно в код.
22

3-
In this code, `birthday` is exactly like that. So we could use the upper case for it.
3+
В нашем примере, `birthday` именно такая переменная. Поэтому мы можем использовать заглавные буквы.
44

5-
In contrast, `age` is evaluated in run-time. Today we have one age, a year after we'll have another one. It is constant in a sense that it does not change through the code execution. But it is a bit "less of a constant" than `birthday`, it is calculated, so we should keep the lower case for it.
5+
В отличие от предыдущей, переменная `age` вычисляется во время выполнения скрипта. Сегодня у нас один возраст, а через год уже совсем другой. Она является константой, потому что не изменяется при выполнении кода. Но она является "меньшей константой", чем `birthday`, она вычисляется, поэтому мы должны сохранить её в нижнем регистре.

1-js/02-first-steps/04-variables/3-uppercast-constant/task.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ importance: 4
22

33
---
44

5-
# Uppercase const?
5+
# Какие буквы (заглавные или строчные) использовать для имен констант?
66

7-
Examine the following code:
7+
Рассмотрим следующий код:
88

99
```js
1010
const birthday = '18.04.1982';
1111

1212
const age = someCode(birthday);
1313
```
1414

15-
Here we have a constant `birthday` date and the `age` is calculated from `birthday` with the help of some code (it is not provided for shortness, and because details don't matter here).
15+
У нас есть константа `birthday`, а также `age`, которая вычисляется при помощи некоторого кода, используя значение из `birthday` (в данном случае детали не имеют значения, поэтому код не рассматривается).
1616

17-
Would it be right to use upper case for `birthday`? For `age`? Or even for both?
17+
Можно ли использовать заглавные буквы для имени `birthday`? А для `age`? Или одновременно для обеих переменных?
1818

1919
```js
20-
const BIRTHDAY = '18.04.1982'; // make uppercase?
20+
const BIRTHDAY = '18.04.1982'; // использовать заглавные буквы?
2121

22-
const AGE = someCode(BIRTHDAY); // make uppercase?
22+
const AGE = someCode(BIRTHDAY); // а здесь?
2323
```
2424

1-js/02-first-steps/05-types/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ The last three lines may need additional explanation:
226226

227227
## Summary
228228

229-
There are 7 basic types in JavaScript.
229+
There are 7 basic data types in JavaScript.
230230

231231
- `number` for numbers of any kind: integer or floating-point.
232232
- `string` for strings. A string may have one or more characters, there's no separate single-character type.

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. Очевидно, `true`.
16+
2. Используется посимвольное сравнение, поэтому `false`.
17+
3. Снова посимвольное сравнение. Первый символ первой строки `"2"` больше, чем первый символ второй `"1"`.
18+
4. Специальный случай. Значения `null` и `undefinded` равны друг другу при нестрогом сравнении.
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)