I`m using VS code and chrome debugger extension . The code below is executed without errors and produces the expected result, however i see that 'this' is undefined in WATCH section.
class Q {
constructor() {
this.arr = [1,2,3]
}
log(e) {
console.log(e)
}
test() {
this.arr.forEach(e => {
this.log(e); // this is undefined when debugging
})
}
}
const f = new Q().test()
what am I doing wrong?