Error!
Success!

Understanding scope in object oriented JavaScript

0
kicks

Understanding scope in object oriented JavaScript  (Unpublished)

When you think of the keyword this you probably assume it refers to the current instance of the class. This is true for most object oriented languages like C# and Java. So, knowing this you would probably assume the same would be true of JavaScript and it’s this keyword. This is, however, not the case. Like a lot of things about writing object oriented code in JavaScript, this behaves differently in some situations. this does not always refer to the class instance depending on how you use it.


Kicked By:
Drop Kicked By: