JSON Parse error: Unexpected identifier
<p>I pulled this directly from W3 schools website on their JSON tutorial, but I keep getting an error message <strong>JSON Parse error: Unexpected identifier "var"</strong> and it's pointing to the line:</p>

<p>"var myArr = JSON.parse(xmlhttp.responseText);</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;div id="id01"&gt;&lt;/div&gt;

&lt;script&gt;
var xmlhttp = new XMLHttpRequest();
var url = "myserveraddress/myTutorials.txt";

xmlhttp.onreadystatechange = function() {
    if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) {
        var myArr = JSON.parse(xmlhttp.responseText);
        myFunction(myArr);
    }
};
xmlhttp.open("GET", url, true);
xmlhttp.send();

function myFunction(arr) {
    var out = "";
    var i;
    for(i = 0; i &lt; arr.length; i++) {
        out += '&lt;a href="' + arr[i].url + '"&gt;' + 
        arr[i].display + '&lt;/a&gt;&lt;br&gt;';
    }
    document.getElementById("id01").innerHTML = out;
}

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>EDIT: As requested here is the link to the W3 page that has the tutorial <a href="http://www.w3schools.com/json/json_http.asp" rel="nofollow">http://www.w3schools.com/json/json_http.asp</a> and here is the link that has the demohttp://www.w3schools.com/json/tryit.asp?filename=tryjson_http</p>

<p>Also here is what my myTutorials.txt file looks like</p>

<pre><code>var myArray = [
{
"display": "JavaScript Tutorial",
"url": "http://www.w3schools.com/js/default.asp"
},
{
"display": "HTML Tutorial",
"url": "http://www.w3schools.com/html/default.asp"
},
{
"display": "CSS Tutorial",
"url": "http://www.w3schools.com/css/default.asp"
}
]
</code></pre>