You are reading a single comment by @AkosLukacs and its replies. Click here to read the full conversation.
  • My code:

    var foo = `bar`;
    

    If I paste it on the left side of the IDE (Web IDE version 0.70.6) it works fine, if I try to upload it from the edit panel it gives the error message "Error: Line 1: Unexpected token ILLEGAL".

    I'm using more complex strings also containing both single and double quotes, e.g.

    var foo = `console.log('This is "cool".');`; 
    var bar =`Line1
    Line2`;
    //storage.write, storage.read
    eval(foo); 
    console.log(bar);
    

    A workaround would be var foo = 'console.log("This is \\\"cool\\\".");'; and
    bar="Line1\nLine2", but that's hard to write. What's the cause of this error?

  • Strange, works for me with 71.3.
    Do you have minification turned on? Esprima (offline) doesn't like the ` character: "TypeError: Cannot read property 'length' of undefined". Online (closure compiler) minification works.
    Try upgrading to the latest web ide :)

  • Do you have minification turned on? Esprima (offline) doesn't like the ` character

    Hit. Without Esprima it works fine. Thanks!

About

Avatar for AkosLukacs @AkosLukacs started