Here are a collection of articles to help understand the Javascript concepts of scope and 'this'. If you find that this is undefined is very likely to be because 'this' is not what you expect it to be.
Scope
Scope is the visibility of functions and variables in the different parts of your code during runtime.
https://hackernoon.com/understanding-javascript-scope-1d4a74adcdf5
This
this
in Javascript is the probably most magical keyword in the programming world. Its unpredictable nature has reached an unprecedented level.
https://dev.to/ycmjason/let-me-explain-to-you-what-is-this-javascript-44ja
https://blog.bitsrc.io/what-is-this-in-javascript-3b03480514a7
http://javascriptissexy.com/understand-javascripts-this-with-clarity-and-master-it/
Comments
0 comments
Please sign in to leave a comment.