What is wrong in the following function ? function loadDoc() { varxhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 3 &&this.status == 200) { console.log(this.responseText); } }; xhttp.open("GET", "cd_catalog.xml", true); xhttp.send(); }
Correct Answer: In line 4, the comparison of this.readyState should be with 4
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Ajax MCQ Questions