Are property accessors really just property accessors?

Quite new to JS:

If I could access JS objects like Date with a property accessor (say document.formi1.Date.getFullYear), and if Date objects (or any other object data type for that matter) aren’t properties, how is it that we can access them with a property accessor?

Thanks.

but you can’t. the (HTML) DOM API doesn’t work like that.

Indeed, I wrongly remembered the code in which there are 2 different vars: One for the Date object, and one for the getFullYear method, and the Date object indeed does not have a property accessor but rather appears after the term “new”.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.