Skip to content
14 changes: 7 additions & 7 deletions 1-js/02-first-steps/05-types/1-string-quotes/solution.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Backticks embed the expression inside `${...}` into the string.
Tərs dırnaqlar (backticks: ``) `${...}` daxilində ifadəni mətnə yerləşdirir.

```js run
let name = "Ilya";

// the expression is a number 1
alert( `hello ${1}` ); // hello 1
// İfadənin çıxışı bir rəqəmdir: 1
alert( `salam ${1}` ); // salam 1

// the expression is a string "name"
alert( `hello ${"name"}` ); // hello name
// İfadənin çıxışı bir mətndir: "ad"
alert( `salam ${"ad"}` ); // salam ad

// the expression is a variable, embed it
alert( `hello ${name}` ); // hello Ilya
// İfadə dəyişən olduğundan, dəyişənin dəyəri istifadə olunacaq
alert( `salam ${name}` ); // salam Ilya
```
10 changes: 5 additions & 5 deletions 1-js/02-first-steps/05-types/1-string-quotes/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ importance: 5

---

# String quotes
# String dırnaqları

What is the output of the script?
Skriptin nəticəsi nə olacaq?

```js
let name = "Ilya";

alert( `hello ${1}` ); // ?
alert( `salam ${1}` ); // ?

alert( `hello ${"name"}` ); // ?
alert( `salam ${"ad"}` ); // ?

alert( `hello ${name}` ); // ?
alert( `salam ${name}` ); // ?
```
Loading