Hope all is
well with you. I have a question about the example on page 328 from Chapter 10 of Professional JavaScript for Web Developers (Third Edition).
In your example you select an element from the DOM:
var div = document.getElementById("myDiv");
And access its properties like this:
div.id; //"myDiv"
div.className; //"bd"
div.title; //"Body text"
My question is what happens behind the scenes. Are you basically creating a new object like this?
var div = {
id
: "
myDiv
",
className
: "
bd
",
title:
"
Body text
"
};
Best,
-Andy