Why cannot read property 'asdasd' of undefined?

hi everone

why cannot read property. ı not know

my js code

buttonIslev(id){
  console.log(this.koltukSay);
 if(!this.koltukSay[id].kid){
  this.koltukSay[id]=Array("kid",id);
 }

thanks

can you post output of this line

> console.log(this.koltukSay);

1 Like

I guess “id” has “asdasd” as value here, so “this.koltuksay” is undefined.

1 Like

I Find solution thanks for answers