IE11 throwing "SCRIPT1014: invalid character" where all other browsers work : <p>Here's a new one, IE11 is throwing errors on code that works in every other browser. </p>

<p>Anyway, after a few hours of "fixing" code so that IE11 doesn't fall on its own face I have come across an error I just cannot seem to find a solution to. Here is the code in question:</p>

<pre><code>$('input[name="messageAccount"]').change(function () {
    $aButton.show();
    var addedIds = $("#hdnfield").val();
    if (addedIds == null || addedIds === "") {
        $("#hdnfield").val(this.value);
    } else {
        $("#hdnfield").val(`${addedIds}${this.value}`);
    };
});
</code></pre>

<p>This is nested on the inside of the success call in an Ajax request. IE's debugger is saying the error is coming from the content of the <code>else</code> statement but it's also reading all the brackets wrong. For example the opening parenthesis on this function is being "closed" after the closing bracket for the Ajax request... (hopefully that made sense). </p>

<p>Has anyone else had a similar issue with IE before? I've got a number of other bugs to fix so if there are any replies I will post back as soon as I can. Thanks in advance.</p>

<p>EDIT: just for reference I am currently running this locally and is part of what will become an internally hosted web app.</p>
