Template literal syntax not working in IE11

The back-tick character is not recognized as a valid character in IE11 when using the "use strict" directive when it works in other browsers such as Chrome.

What is the interpretation of this behavior, given that IE11 is still widely used even among Windows 10 users?

        "use strict";

        function doIt() {
          let tt;
          tt = 50;
          alert(`${tt}`);
          alert("test");
        }
       doIt();
Run codeHide result

Error: {"message": "Invalid character", "filename": " http://stacksnippets.net/js ", "lineno": 18, "colno": 17}

+20
source share
1 answer

ECMAScript 6, , IE11. "use strict"; , , , , , , , .

, IE11, Babel.

+43

Source: https://habr.com/ru/post/1680644/


All Articles