Most objects in JavaScript have an internal property called [[Prototype]], which stores a reference to another object. When a property is accessed and not found on the object itself, the JavaScript engine looks at its prototype, then the prototype's prototype, and so on until the property is found or the end of the prototype chain is reached. This mechanism is known as prototypal inheritance. It allows objects to inherit properties and methods from their prototypes. For example, built-in methods like .hasOwnProperty, .map, and .filter are available on objects because they are inherited from their prototypes, even though they are not explicitly declared on the objects themselves.
development
Images often have large file sizes, which can significantly impact performance and consume more resources. In this section we will introduce common techniques for handling images with performance in mind.
Fonts are often large and take a while to load. Some browsers hide text until the intended font is downloaded, which could potentially delay First Contentful Print (FCP). Font swapping also poses potential layout shifts when the fallback font and the downlaoded font take up difference space, which affects Cumulative Layout Shift (CLS).