Expert Developer JavaScript Question: Download Expert JavaScript Developer PDF

What is 'this' keyword in JavaScript?

Tweet Share WhatsApp

Answer:

'This' keyword is used to point at the current object in the code. For instance: If the code is presently at an object created by the help of the 'new' keyword, then 'this' keyword will point to the object being created.

Download Expert JavaScript Developer PDF Read All 150 Expert JavaScript Developer Questions
Previous QuestionNext Question
What is a potential pitfall with using typeof bar === "object" to determine if bar is an object? How can this pitfall be avoided?Explain how to read and write a file using JavaScript?