This topic is important to me because I’ve been wanting to learn how to implement changes to HTML through JS
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Basics. https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction. http://simpleprogrammer.com/2013/07/15/understanding-the-problem-domain-is-the-hardest-part-of-programming. https://betterprogramming.pub/intermediate-javascript-whats-the-difference-between-primitive-values-and-object-references-e863d70677b.
An Object is an collection of related data and/or functionality.
(Usually consist of several variables and functions). (Called properties and methods when they are inside objects.)
Objects can contain multiple members, seperated by commas.
object literal - writing out the object contents as we’ve come to create it.
You access objects properties and methods using dot notation.
Bracket notation provides an alternative way to access object properties. Ex..
Person.age;
person.name.first;
bracket notation
person["age"];
person["name"]["first"];
Objects are sometimes called associative arrays.
DOM is the data representation of the objects that comprise the structure and content of a document on the web.
DOM allows web pages to be manipulated.
Object orientated representation of web page, modified using javascript.
const paragraphs = document.querySelectorAll("p");
// paragraphs[0] is the first <p> element
// paragraphs[1] is the second <p> element, etc.
alert(paragraphs[0].nodeName);
This returns all p tags in an element, and puts it in an object.
DOM is a web API.
I want to learn more syntax for using DOM. How do you make more complicated fields for DOM.