paint-brush
What is 'this’ in JavaScript?by@suhas010
367 reads
367 reads

What is 'this’ in JavaScript?

by Suhas4mMay 4th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

'this' is always been a pain in the a** for many JavaScript developers, but it’s time to say ‘I got this’ Previously, I wrote Understanding Scope and Context in JavaScript. JavaScript will create a separate execution context for a function called with a new keyword. The value of this is determined by how a function is being called. JavaScript has introduced a new property called globalThis which points to global this or global this. In a web browser, the value of global this is different in NodeJS (Object), and in WebWorker it might be DedicatedWorkerGlobalScope.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - What is 'this’ in JavaScript?
Suhas HackerNoon profile picture
Suhas

Suhas

@suhas010

JavaScript enthusiastic, in love with ReactJS

About @suhas010
LEARN MORE ABOUT @SUHAS010'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Suhas HackerNoon profile picture
Suhas@suhas010
JavaScript enthusiastic, in love with ReactJS

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here