> For the complete documentation index, see [llms.txt](https://hemantajax-2.gitbook.io/es6-step-by-step/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hemantajax-2.gitbook.io/es6-step-by-step/template-string.md).

# Template String

```javascript
var name="Hemant", 
    loc = "Hyderabad";

var str = `
    my name is ${name}, 
    I am stying in ${loc}`;

console.log(str);

// output
    my name is Hemant, 
    I am stying in Hyderabad
```

## Use Case 1 ( variable manipulation )

```javascript
var x =1, y=2;

var str = `sum of 
    ${x} + ${y} = ${x +y}
`;

console.log(str);

// output
sum of 
    1 + 2 = 3
```

## Use Case 2

```javascript
var x =1, y=2;

var str = ` Today's date is
    ${new Date()}
`;

// output
 Today's date is
    Sun Dec 06 2015 17:36:32 GMT+0530 (India Standard Time)
```
