According to the ES6 spec, the syntax
foo`Hello!`
should behave exactly like
foo('Hello!')
Putting a template literal after an expression triggers a function call, similar to how a parameter list (comma-separated values in parentheses) triggers a function call. The previous code is equivalent to the following function call (in reality, the function gets more information, but that is explained later).
However, in the following snippet, binding a value to a function causes the 2 syntaxes to behave differently:
function alertParans() { alert(this) }
function alertNoParans() { alert `${this}` }
var executeParans = alertParans.bind('roman empire');
var executeNoParans = alertNoParans.bind('greek empire');
executeParans();
executeNoParans();
The first call prints 'roman empire' whilst the second will always just print a comma. Why?