Davide
Davide

Reputation: 475

Grunt and ECMA6Script

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

Answers (1)

Kunal Kapadia
Kunal Kapadia

Reputation: 3333

Template strings (``) in ES6 are replacement for quotes ('').

You need to write it as:

let str = `
    Hello
`;

Upvotes: 1

Related Questions