how to delay interpolation of template strings?

Claude Pache claude.pache at
Tue Dec 16 00:59:24 PST 2014

> Le 16 déc. 2014 à 09:27, Niloy Mondal <niloy.mondal84 at> 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:

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list