I have this code below
let geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"];
let array = ["Mallard", "Hook Bill", "African", "Crested", "Pilgrim",  "Toulouse", "Blue Swedish"];
function gooseFilter(array, geese) {
     var name = [];
     for (let i = 0; i < geese.length; i++) {
         if (array.includes(geese[i])) {
             name.push(geese[i]);
         }
         return name;    
     }
}
gooseFilter(array);
and I have an error 'Cannot read property 'length' of undefined', and I don't know why. Do you have any idea how can I fix this?
 
     
     
     
     
     
     
     
    