This Keyword
Definition
A special keyword that refers to the object a function is called on. Its value depends on how a function is invoked: in a method, `this` refers to the owner object; in a regular function, it defaults to `globalThis` (or `undefined` in strict mode).
Code Example
Learn More
Related Terms
Every JavaScript object has a hidden internal property called [[Prototype]] that links to another object. When a property is accessed on an object and not found, JavaScript walks up the prototype chain to find it. This is the basis of JavaScript's inheritance model.
ClassES6 syntactic sugar over JavaScript's prototype-based inheritance. Classes provide a cleaner way to create objects and implement inheritance using extends and super.
Arrow FunctionA compact function syntax introduced in ES6. Arrow functions do not have their own this, arguments, or super bindings, making them ideal for callbacks and methods that need to preserve the outer this context.