class TestClass {
constructor() {
this.a = 'Hello World'
this.q = async.queue(this.hello, 1)
}
hello(item, callback) {
console.log(item)
console.log(this.a) /* Not defined */
callback()
}
start() {
my_jobs = ['Foo', 'Bar',]
my_jobs.forEach(element => {
this.q.push(element)
})
}
}
my_class = new TestClass()
my_class.start()
答案 0 :(得分:1)
BLog::LOG_ERROR