/**
* A prototype to create Animal objects
*/
function Animal (name, type, breed) {
this.name = name;
this.type = type;
this.breed = breed;
}
function createAnimalObjects(names, types, breeds) {
// IMPLEMENT THIS FUNCTION!
}
/* Input should be like this
a_name = ['Dog','Cat', 'Fowl','Goat'];
a_type = ['Security Dog', 'Blue Eyes', 'Cock', 'she Goat'];
a_breed = ['German Shepherd', 'Noiseless', 'African Cock', 'American Goat'];
createAnimalObjects(a_name,a_type,a_breed);
*/
/* *
[Animal{name:'Dog', type:'Security Dog' ,breed:'German Shepherd'},
Animal{name:'Cat', type:'Blue Eyes', breed:'Noiseless'}
......etc]
Массив должен возвращать новый животный объект, используя приведенный выше прототип. Пожалуйста, помогите комментировать ваш код для ясности. Я ученик.