javascript - Call anonymous function with 'this' from function -


How can I execute this mismatched function with the reference of a given function through a call?

  function testing (text) {this.first = 'test'; Console.log (this.first); } {Function (val) {return function (val) {console.log} (this.first);}} ()). Call (test)  

I did not take it in myself; Before entering the return function:

  (function (val) {var self = this; // This line returns function (val) {console.log (self.first);}} )). Call (test)  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

Powerbuilder 12.1 and DataWindow in Design vs Debug and Executable/Runtime -

css3 - HTML Block Anchor element only half clickable in Chrome -