You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/05-types/article.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,47 +84,47 @@ Hal-hazırda `BigInt` Firefox və Chrome-da dəstəklənir, lakin Safari, IE və
84
84
85
85
## String
86
86
87
-
Astringin JavaScript must be surrounded by quotes.
87
+
JavaScript-də bir [`string`](https://en.wikipedia.org/wiki/String_(computer_science)) mütləq dırnaqlar ilə əhatə olunmalıdır.
88
88
89
89
```js
90
-
let str = "Hello";
91
-
let str2 = 'Single quotes are ok too';
92
-
let phrase = `can embed another ${str}`;
90
+
let str = "Salam";
91
+
let str2 = 'Tək dırnaqlar da uyğundur';
92
+
let phrase = `başqa bir ${str} ehtiva edə bilər`;
93
93
```
94
94
95
-
In JavaScript, there are 3 types of quotes.
95
+
JavaScript-də `string`-i ifadə etməyin 3 yolu mövcuddur.
96
96
97
-
1.Double quotes:`"Hello"`.
98
-
2.Single quotes:`'Hello'`.
99
-
3.Backticks:<code>`Hello`</code>.
97
+
1.Cüt dırnaq:`"Hello"`.
98
+
2.Tək dırnaq:`'Hello'`.
99
+
3.Tərs dırnaq:<code>`Salam`</code>.
100
100
101
-
Double and single quotes are "simple"quotes. There's practically no difference between them in JavaScript.
101
+
Cüt dırnaq və tək dırnaqlar "sadə" dırnaqlar adlanır. JavaScript-də onların arasında demək olar ki, heç bir fərq yoxdur.
102
102
103
-
Backticks are "extended functionality" quotes. They allow us to embed variables and expressions into a string by wrapping them in `${…}`, for example:
103
+
Tərs dırnaqlar "genişləndirilmiş funksionallıq" təklif edən dırnaqlardır. Onlar bizə dəyişənləri və ifadələri `${...}` arasına alaraq bir `string`-ə daxil etməyə imkan verir, məsələn:
alert( `the result is *!*${1 + 2}*/!*` ); // the result is 3
111
+
//bir ifadə daxil edin
112
+
alert( `nəticə: *!*${1+2}*/!*` ); //nəticə: 3
113
113
```
114
114
115
-
The expression inside `${…}` is evaluated and the result becomes a part of the string. We can put anything in there: a variable like `name` or an arithmetical expression like `1 + 2` or something more complex.
115
+
`${...}`arasındakı ifadə JavaScript mühərriki tərəfindən dəyərləndirilir və nəticə `string`-in bir hissəsinə çevrilir. Biz burada istənilən şeyi yaza bilərik: məsələn, `name`adlı bir dəyişən, `1+2`kimi riyazi bir ifadə və ya daha kompleks bir şey.
116
116
117
-
Please note that this can only be done in backticks. Other quotes don't have this embedding functionality!
117
+
Qeyd edək ki, bu yanlız tərs dırnaqlar (backtricks: ``) üçün keçərlidir. Digər dırnaqlarda bu funksionallıq mövcud deyil.
118
118
```js run
119
-
alert( "the result is ${1+2}" ); // the result is ${1+2} (double quotes do nothing)
119
+
alert( "nəticə: ${1 + 2}" ); //nəticə: ${1 + 2} (cüt dırnaqlar heç nə etmir)
120
120
```
121
121
122
-
We'll cover strings more thoroughly in the chapter <info:string>.
122
+
Biz `string`-ləri <info:string> fəslində daha ətraflı izah edəcəyik.
123
123
124
-
```smart header="There is no *character* type."
125
-
In some languages, there is a special "character" type for a single character. For example, in the C language and in Java it is called "char".
124
+
```smart header="*character* tipi mövcud deyil."
125
+
Bəzi proqramlaşdırma dillərində yalnız bir simvolu saxlamaq üçün xüsusi bir verilənlər tipi mövcuddur. Məsələn, C və Java dillərində bu tip"char" adlanır.
126
126
127
-
In JavaScript, there is no such type. There's only one type:`string`. Astring may consist of only one character or many of them.
127
+
JavaScript-də belə bir tip yoxdur. Yalnız bir verilən tipi var:`string`. Bir`string` bir və ya daha çox simvoldan ibarət ola bilər.
0 commit comments