Skip to content

Commit 403307d

Browse files
committed
Translated semicolon-related sections in "Code Structure" article to Azerbaijani
1 parent 8488eb5 commit 403307d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

1-js/02-first-steps/02-structure/article.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,40 @@ Kodumuzda istədiyimiz qədər ifadə ola bilər. İfadələr nöqtəli vergüll
1313
Məsələn, burada "Salam, dünya" mesajını iki xəbərdarlıq şəklində ayırmışıq:
1414

1515
```js run no-beautify
16-
alert('Hello'); alert('World');
16+
alert('Salam'); alert('Dünya');
1717
```
1818

19-
Usually, statements are written on separate lines to make the code more readable:
19+
Adətən, ifadələr kodun oxunaqlılığını artırmaq üçün ayrı-ayrı sətirlərdə yazılır:
2020

2121
```js run no-beautify
22-
alert('Hello');
23-
alert('World');
22+
alert('Salam');
23+
alert('Dünya');
2424
```
2525

26-
## Semicolons [#semicolon]
26+
## Nöqtəli Vergüllər [#semicolon]
2727

28-
A semicolon may be omitted in most cases when a line break exists.
28+
Sətir kəsilməsi mövcud olduqda nöqtəli vergül buraxıla bilər.
2929

30-
This would also work:
30+
Bu da işləyəcək:
3131

3232
```js run no-beautify
33-
alert('Hello')
34-
alert('World')
33+
alert('Salam')
34+
alert('Dünya')
3535
```
3636

37-
Here, JavaScript interprets the line break as an "implicit" semicolon. This is called an [automatic semicolon insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion).
37+
Burada JavaScript interpretatoru sətir sonunu "örtülü" nöqtəli vergül kimi qəbul edir. Bu proses [avtomatik nöqtəli vergül daxil edilməsi (automatic semicolon insertion)](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion) adlanır.
3838

39-
**In most cases, a newline implies a semicolon. But "in most cases" does not mean "always"!**
39+
**Əksər hallarda yeni sətir bir nöqtəli vergülü nəzərdə tutur. Amma "əksər hallarda" "hər zaman" demək deyil!**
4040

41-
There are cases when a newline does not mean a semicolon. For example:
41+
Müəyyən hallar var ki, yeni sətir nöqtəli vergül anlamına gəlmir. Məsələn:
4242

4343
```js run no-beautify
4444
alert(3 +
4545
1
4646
+ 2);
4747
```
4848

49-
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so the semicolon is not required. And in this case that works as intended.
49+
Bu kodun nəticəsi `6` olacaq, çünki, JavaScript interpretatoru burada nöqtəli vergül daxil etmir. JavaScript üçün intuitiv olaraq aydındır ki, əgər sətir `+` (üstəgəl) simvolu ilə bitirsə, bu "natamam ifadə"dir və nöqtəli vergül tələb olunmur. Bu halda kod gözlənildiyi kimi işləyir.
5050

5151
**But there are situations where JavaScript "fails" to assume a semicolon where it is really needed.**
5252

0 commit comments

Comments
 (0)