Claude Pache (2014-12-16T08:59:24.000Z)
> Le 16 déc. 2014 à 09:27, Niloy Mondal <niloy.mondal84 at gmail.com> a écrit :
> 
> I want to define a template string using backquotes in a different file and then have it interpolated with actual values in a different file. How can I do it?
> 

Just enclose it in a function:

```javascript
   function foo(a) {
        return `some template ${a}`
    }

    foo("bar") // will evaluate `some template ${"bar"}`
```

—Claude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141216/e40cb72c/attachment.html>
d at domenic.me (2014-12-19T22:51:54.424Z)
> Le 16 déc. 2014 à 09:27, Niloy Mondal <niloy.mondal84 at gmail.com> a écrit :
> 
> I want to define a template string using backquotes in a different file and then have it interpolated with actual values in a different file. How can I do it?
> 

Just enclose it in a function:

```javascript
   function foo(a) {
        return `some template ${a}`
    }

    foo("bar") // will evaluate `some template ${"bar"}`
```