Reputation: 475
I have Grunt compiler for my project with jshint.
I use this syntax for multiline string:
string = '`
Hello
`';
but I get this error when I compile it:
[L328:C33] W112: Unclosed string.
string = '`
Doesn't it support ECMA6 syntax?
Upvotes: 0
Views: 156
Reputation: 3333
Template strings (``) in ES6 are replacement for quotes ('').
You need to write it as:
let str = `
Hello
`;
Upvotes: 1