What is the purpose of the this keyword in JavaScript?

  • Refers to the current function's scope
  • Refers to the current instance or object
  • Refers to the global scope
  • Refers to the parent function's scope
In JavaScript, the this keyword refers to the current instance or object. Its value depends on how a function is called and is often used in object-oriented programming.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *