bendtherules writes stuff

bendtherules writes stuff

Closure and this - How are variables resolved within a function?

Aug 2, 20207 min read

Let's start with a example of closure - function outer() { // scope A var myText = 'Hello' return function inner() { // scope B console.log(myText) } } { // scope C let myText = 'World' let fn = outer() fn(); } Here we have ...

Flipkart UI Engineer 1 interview - My experience
What is `this` inside foo.bar()?