This forum is now read-only. Please use our new forums at

699 points
Submitted by
over 5 years ago

var syntax

Here's line 7 :
xmlDocument = xhr.responseXML;

xmlDocument wasn't defined in previous lines of code, so I would have imagined the syntax to be something like :
var xmlDocument = xhr.responseXML;

Why does this piece of code work without the "var xmlDocument" syntax ?

0 votes


Can you show us all of your code?
It's possible that Codecademy purposefully corrected the error...

629 points
Submitted by
Tony Brar
almost 5 years ago