What is this in JavaScript?



What is this in JavaScript?..

Answer / hr@tgksolutions.com

this refers to the object that is executing the current function.
• In the global scope, this refers to window (in browsers).
• Inside an object method, this refers to the object itself.
• Inside an arrow function, this is lexically bound (inherits from the surrounding scope).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

What are the ways to emit client-side javascript from server-side code in asp. Net?

0 Answers  


Are all javascript variables global?

0 Answers  


How do browsers work?

0 Answers  


How and where javascript namespacing is used?

0 Answers  


How do you send a message to the browser in JavaScript?

3 Answers   Four soft, Vsys,


What is the difference between script type and the script language attributes?

0 Answers  


print the following using loop. 54321 4321 321 21 1

2 Answers   Delhi Public School,


What are javascript objects?

0 Answers  


How do I enable javascript on google?

0 Answers  


how can we retrieve value from one database server and store them another database server using sql server code

0 Answers   HP,


What is a nan value?

0 Answers  


What makes something a function?

0 Answers  


Categories