logo

Crowdly

Consider the following JavaScript code that conducts XML parsing text = "<book...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Consider the following JavaScript code that conducts XML parsing

text = "<bookstore><book>" + "<title>Everyday Italian</title>" +

"<author>Giada De Laurentiis</author>" + "<year>2005</year>" +

"</book></bookstore>";

parser = new DOMParser();

xmlDoc = parser.parseFromString(text,"text/xml");

var a = xmlDoc.getElementsByTagName("year")[0].nodeName;

What would the value of variable a be set to?

0%
0%
100%
0%
More questions like this

Want instant access to all verified answers on moodle.gla.ac.uk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!