Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 8 additions & 9 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,14 @@

Backticks embed the expression inside `${...}` into the string.
Backticks verankeren de uitdrukking in `${...}` in de string.

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

// the expression is a number 1
alert( `hello ${1}` ); // hello 1
// de uitdrukking is een nummer 1
alert( `hallo ${1}` ); // hallo 1

// the expression is a string "name"
alert( `hello ${"name"}` ); // hello name
// de uitdrukking is een tekenreeks "naam".
alert( `hallo ${"naam"}` ); // hallo naam

// the expression is a variable, embed it
alert( `hello ${name}` ); // hello Ilya
// de uitdrukking is een ingevulde variabele
alert( `hallo ${naam}` ); // hallo Ilya
```
10 changes: 3 additions & 7 deletions 1-js/02-first-steps/05-types/1-string-quotes/task.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
importance: 5

---

# String quotes

What is the output of the script?
Wat is de output van het script?

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

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

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

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