Skip to content

Commit 1af4fef

Browse files
authored
Merge pull request #7 from javascript-tutorial/translate-variables
Translate Variables page
2 parents a7590b0 + 82df3f5 commit 1af4fef

File tree

7 files changed

+158
-157
lines changed

7 files changed

+158
-157
lines changed
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+
Aşağıdakı kodda olan hər sətir tapşırıqda olan hər maddəyə aiddir.
22

33
```js run
4-
let admin, name; // can declare two variables at once
4+
let admin, name; // bir dəfəyə iki dəyişən elan etmək mümkündür
55

6-
name = "John";
6+
name = "Orxan";
77

88
admin = name;
99

10-
alert( admin ); // "John"
10+
alert( admin ); // "Orxan"
1111
```
1212

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 2
22

33
---
44

5-
# Working with variables
5+
# Dəyişənlər ilə işləmək
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. İki dəyişən elan edin: `admin` `name`.
8+
2. `name` dəyişəninə `"Orxan"` dəyərini təyin edin.
9+
3. `name` dəyişənindən `admin` dəyişəninə dəyəri kopyalayın.
10+
4. `admin` dəyişəninin dəyərini `alert` istifadə edərək göstərin (nəticə "Orxan" olmalıdır).
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
## The variable for our planet
1+
## Bizim planet üçün dəyişən
22

3-
That's simple:
3+
Bu sadədir:
44

55
```js
6-
let ourPlanetName = "Earth";
6+
let ourPlanetName = "Yer";
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+
Qeyd edək ki, daha qısa `planet` adı istifadə edə bilərdik, amma onun hansı planetə aid olduğu aydın olmaya bilər. Daha izahlı olmaq yaxşıdır. Ən azı dəyişən çox uzun olmadığı müddətcə.
1010

11-
## The name of the current visitor
11+
## Cari ziyarətçinin adı
1212

1313
```js
14-
let currentUserName = "John";
14+
let currentUserName = "Orxan";
1515
```
1616

17-
Again, we could shorten that to `userName` if we know for sure that the user is current.
17+
Yenə də, əgər istifadəçinin cari olduğunu dəqiq bilsək, bunu `userName` kimi qısalda bilərik.
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+
Müasir redaktorlar və avtomatik tamamlanma xüsusiyyəti uzun dəyişən adlarını yazmağı asanlaşdırır. Onlardan qənaət etməyin. Üç sözlük bir ad tamamilə qəbul ediləndir.
2020

21-
And if your editor does not have proper autocompletion, get [a new one](/code-editors).
21+
Əgər redaktorunuzda avtomatik tamamlama xüsusiyyəti yoxdursa, [yeni redaktor əldə edin](/code-editors).

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ importance: 3
22

33
---
44

5-
# Giving the right name
5+
# Düzgün adın verilməsi
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. Bizim planetimiz adında dəyişən yaradın. Bu dəyişəni necə adlandırardınız?
8+
2. Veb səhifəyə daxil olan cari ziyarətçinin adını dəyişəndə saxlayın. Bu dəyişəni necə adlandırardınız?
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+
Normalda, biz əl ilə yazılan sabit dəyişənləri böyük hərflərlə yazırıq. Digər sözlə dəyişənin dəyəri skriptin icrasından öncə bilindikdə və kodda birbaşa yazıldıqda biz bu dəyişəni böyük hərflərlə yazırıq.
22

3-
In this code, `birthday` is exactly like that. So we could use the upper case for it.
3+
Bu kodda `birthday` məhz belədir. Ona görə də onun üçün böyük hərflərdən istifadə edə bilərik.
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+
Lakin `age` dəyişəni icra zamanı hesablanır. Bu gün bizdə fərqli bir yaş, bir il sonra isə fərqli bir yaş olacaq. Bu dəyişən kod icrası zamanı dəyişmir amma bu dəyişən hesablanır deyə `birthday`-dən "daha az sabitdir". Bu səbəbdən, bu dəyişənin adı böyük hərflərlə yazılmamalıdır.

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@ importance: 4
22

33
---
44

5-
# Uppercase const?
5+
# Böyük hərflərlə const?
66

7-
Examine the following code:
7+
Aşağıdakı koda baxın:
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+
Burada `birthday` olaraq adlandırılmış bir tarix dəyəri saxlayan konstantımız var. `age` həmin `birthday` və müəyyən bir kodun köməyi ilə hesablanır (qısa olsun deyə və təfərrüatlar burada əhəmiyyətli olmadığı üçün bu kod təmin edilməyib).
1616

17-
Would it be right to use upper case for `birthday`? For `age`? Or even for both?
17+
`birthday` üçün böyük hərflərdən istifadə etmək yaxşı fikirdir?
1818

1919
```js
20-
const BIRTHDAY = '18.04.1982'; // make uppercase?
20+
const BIRTHDAY = '18.04.1982'; // böyük hərflərlə yazaq?
2121

22-
const AGE = someCode(BIRTHDAY); // make uppercase?
22+
const AGE = someCode(BIRTHDAY); // böyük hərflərlə yazaq?
2323
```
2424

0 commit comments

Comments
 (0)