Всем привет. Прошу помощи с кодом. Не могу решить задание. Что я делаю не так, что мне нужно изменить?? Добра вам)
class popeluchka {
constructor(name, age , sizeFoot) {
this,name = name;
this.age = age;
this.sizeFoot = sizeFoot;
}}
class princ extends popeluchka {
constructor(name,age ,sizeFoot ,shoesSize) {
super(name, age);
this.shoesSize = shoesSize;
}indPopeluchka(array){
let find = null;
for (let item of array){
if (item.sizeFoot === this.shoesSize){
find = item;
}
} if (find){
console.log('My Popeluchka name is' + this.name);
}else {
console.log('i didint find my popeluchka');
}
}
}
let popelushka1 = new popeluchka('Julia' ,18,31);
let popelushka2 = new popeluchka('Lesia' , 19, 29);
let popelushka3 = new popeluchka('Diana', 21,30);
let popelushka4 = new popeluchka('Olexandra', 17, 28);
let popelushka5 = new popeluchka('Viktoria' , 19,33);
let popelushka6 = new popeluchka( 'Maria,',21, 34);
let popelushka7 = new popeluchka('Nadia',23,35);
let popelushka8 = new popeluchka('Khrystina' , 17, 36);
let popelushka9 = new popeluchka('Liza', 19,39);
let popelushka10 = new popeluchka('Marta', 21,41);
let allPopeluchka = [popelushka1,popelushka2,popelushka3,popelushka4,,popelushka5,popelushka6,popelushka7,popelushka8,popelushka9,popelushka10];
let prince = new princ('Vasya' , 32, 31);
prince.findPopeluchka(allPopeluchka)