+ 1
Unable to solve 65 Code Project Words
Why is this giving an error its the last code project from the JavaScript course https://code.sololearn.com/ctW2h4WiA6dk/?ref=app
2 odpowiedzi
+ 5
That’s because ‘this.k’ doesn’t exist.
You may ask “why? I’ve declared it in the constructor”
The problem here is that you used var k =[] (variable with local scope inside constructor) but you should use this.k = [] instead (adds k as an object property).
+ 2
Thanks for answering