> For the complete documentation index, see [llms.txt](https://demirels-organization.gitbook.io/javascript-tutorial/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://demirels-organization.gitbook.io/javascript-tutorial/template-strings.md).

# Template strings

Template strings are a way to create strings that include dynamic content. They are created using backticks (\`) instead of single or double quotes.

Here is an example of a template string:

```javascript
const name = 'John';
console.log(`Hello, ${name}!`); // Outputs "Hello, John!"
```

Template strings can also span multiple lines:

```javascript
const message = `Welcome to
my adventure game!`;
console.log(message); // Outputs "Welcome to\nmy adventure game!"
```

Template strings can also include expressions, which are evaluated and the result is included in the string. This is called interpolation.

For example:

```javascript
const a = 10;
const b = 20;
console.log(`The sum of ${a} and ${b} is ${a + b}.`); // Outputs "The sum of 10 and 20 is 30."
```

Let's look at another example in the context of a Strategy Game
