TL;DR —
'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.
[story continues]
Written by
@suhas010
JavaScript enthusiastic, in love with ReactJS
Topics and
tags
tags
javascript|reactjs|web-development|frontend-development|javascript-fundamentals|development|javascript-development|understanding-javascript
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: 4BebeKmIfqsKVxjtG67Xn7qIZ_Z_o_58vlJZefwpEnc
