How does the browser rendering engine work?
In order to render content the browser has to go through a series of steps: 1) Document Object Model (DOM) - The browser makes sense of your HTML file by converting it into DOM structure. 2) CSS object model (CSSOM) - Similar to the first step, the browser converts all the CSS into rules the browser understands. 3) Render Tree - The browser then combines the DOM and CSSOM and creates a final render tree. This contains both the content and the style information of everything that will be visible. 4) Layout - Next, the browser calculates the position (layout) of each visible element on the page. 5) Paint - Finally, the browser paints the pixels to the screen and content becomes visible to the user. It's important to note that not every element gets painted on at the same time.
What is an object and what is primitive? How are they stored differently? How do we compare objects to each other? How do we compare primitives to each other?
The difference between primitives and objects is that primitives are the basic data types and can't be broken down any further, but objects, however, are made up of primitives and can have unique behaviors. Primitives are directly stored in "boxes" since each primitive takes up the same amount of memory each time, but objects have to have "pointers" or "addresses" because each object takes up a different amount of memory. When comparing primitives you can simply use the `==` operator, but when comparing objects you have to use the `equals()` method.