About 31,600,000 results
Open links in new tab
  1. this - JavaScript | MDN - MDN Web Docs

    Apr 10, 2025 · The this keyword refers to the context where a piece of code, such as a function's body, is supposed to run. Most typically, it is used in object methods, where this refers to the …

  2. JavaScript this - W3Schools

    In JavaScript, the this keyword refers to an object. The this keyword refers to different objects depending on how it is used: In an object method, this refers to the object. Alone, this refers to …

  3. javascript - How does "this" keyword work within a function?

    If this is used inside a constructor function, and the function was invoked with the new keyword, this refers to the object that will be created. this will continue to mean the object even in public …

  4. Object methods, "this" - The Modern JavaScript Tutorial

    May 18, 2024 · In JavaScript, keyword this behaves unlike most other programming languages. It can be used in any function, even if it’s not a method of an object. There’s no syntax error in …

  5. JavaScript this Keyword - GeeksforGeeks

    Jan 18, 2025 · The this keyword in JavaScript dynamically refers to the object executing a function or method. Its context varies: in methods, it points to the object itself; in the global …

  6. The JavaScript this Keyword Explained with Examples

    Jun 5, 2024 · In this article, you'll learn how to implicitly (based on context) and explicitly (using the call(), apply(), and bind() methods) determine the value of the this keyword. Here are the …

  7. Demystifying JavaScript this Keyword with Practical Examples

    In JavaScript, you can use the this keyword in the global and function contexts. Moreover, the behavior of the this keyword changes between strict and non-strict modes. In general, the this …

  8. What is 'This' Keyword in JavaScript? Here's How to Implement It

    Apr 12, 2025 · “This” keyword refers to an object that is executing the current piece of code. It references the object that is executing the current function. If the function being referenced is a …

  9. `this` in JavaScript - Mastering JS

    Jan 3, 2020 · TLDR: this is an implicit parameter to a function call. It contains whatever object the function was a property of when it was called. You will often see this in ES6 class methods. In …

  10. What is THIS keyword in JavaScript and How to use it with …

    Jun 17, 2021 · As we know, if we define functions as properties of objects, they are referred to as methods. If a method uses " this " keyword, it refers to that object and can be used to …

  11. Some results have been removed
Refresh