Answer the question
In order to leave comments, you need to log in
VS code debugging, why is this undefined?
When debugging from VS code via chrome debugger extension this is undefined even though the code runs as it should with no errors
class Q {
constructor() {
this.arr = [1,2,3]
}
log(e) {
console.log(e)
}
test() {
this.arr.forEach(e => {
this.log(e); // this undefined в отладчике!
})
}
}
const f = new Q().Test()?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question