Javascript “this” scope

bylove1

New Member
I am writing some JavaScript code. I am a little confused about this keyword. How do I access logger variable in the \[code\]dataReceivedHandler\[/code\] function?\[code\]MyClass: { logger: null, init: function() { logger = LogFactory.getLogger(); }, loadData: function() { var dataReceivedHandler = function() { // how to access the logger variable here? } // more stuff }};\[/code\]
 
Back
Top