Skip to content

Instantly share code, notes, and snippets.

@xuyazhong
Created January 3, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xuyazhong/ad6ab36b5611bdb450dade2f11debd73 to your computer and use it in GitHub Desktop.
Save xuyazhong/ad6ab36b5611bdb450dade2f11debd73 to your computer and use it in GitHub Desktop.
// example
//a.js
// this.callback("abc")
Say(res) {
// this.callback = (result) => {
// console.log("result => ", result)
// }
this.callback = res;
// console.log("this.callback =>", this.callback)
// console.log("this.callback type =>", typeof(this.callback))
}
b.js
// a.ShareInstance().Say((result) => {
// console.log("result => ", result);
// })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment