Start with the animal object you created in the last exercise.
- Create a variable called
animals
and set it equal to an empty array. Using any method you prefer, add your animal object to theanimals
array. - Create a variable called
quackers
and assign it to this object:{name: 'Daffy Duck', description: 'a silly duck', noises: ['quack', 'honk', 'sneeze', 'growl'] }
- Add quackers to the
animals
array using a different method than before. - Inspect your animals array to ensure you have two objects inside.
- Create two more animal objects and add them to the
animals
array. They should have these properties and your choice of values:name
(string),description
(string), andnoises
(array of strings). - Check the length of your array and make sure it's 4.
- Now iterate over your array to output a list of the animals' names.