Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 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.
Obrácené čárky vkládají do řetězce hodnotu výrazu uvnitř `${...}`.

```js run
let name = "Ilya";
let jméno = "Ilja";

// the expression is a number 1
alert( `hello ${1}` ); // hello 1
// výrazem je číslo 1
alert( `ahoj ${1}` ); // ahoj 1

// the expression is a string "name"
alert( `hello ${"name"}` ); // hello name
// výrazem je řetězec "jméno"
alert( `ahoj ${"jméno"}` ); // ahoj jméno

// the expression is a variable, embed it
alert( `hello ${name}` ); // hello Ilya
// výrazem je proměnná, vložíme ji do řetězce
alert( `ahoj ${jméno}` ); // ahoj Ilja
```
12 changes: 6 additions & 6 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
# Uvozovky řetězců

What is the output of the script?
Jaký je výstup tohoto skriptu?

```js
let name = "Ilya";
let jméno = "Ilja";

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

alert( `hello ${"name"}` ); // ?
alert( `ahoj ${"jméno"}` ); // ?

alert( `hello ${name}` ); // ?
alert( `ahoj ${jméno}` ); // ?
```
Loading