If I enter this expression in the browser console (with grave accent):
Math.sin`1`
It will return:
0.8414709848078965
But if I enter this expression (with single quote):
Math.sin'1'
It will throw this error:
SyntaxError: Unexpected number
Why does this error happen?
tag`template literal`
is specifically part of the template literal syntax. It doesn’t work for other string literals.