New course! Every coder should learn Generative AI!
Try a free lesson+ 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 Answers
+ 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