This
Tech

“This” Keyword in Javascript

“This” keyword in javascript is a constant source of confusion. The value of this depends on where it is getting called. “This” is not a reference to the function nor a reference to the lexical scope. It is a binding that is done while calling the function. Here, the value of “this.a” depends on where…