Chris S.

asked • 10/18/19

Javascript Coding Help

Create an array that stores the names of five dogs.

Using a loop, evaluate an array index for even numbers. If the value is even, then output "dog name is a good dog", and if it is an odd number, "dog name is a bad dog."

var mydogs= ["Fifi","Fido","Felix","Floppy","Flipper"];

for (i=0;i < mydogs.length;i++)


   if ( _____  ){ console.log(mydogs[i] + " is a good dog");}

2 Answers By Expert Tutors


Asad I. answered • 01/01/20

Experienced Javascript, php, html and React Native Tutor.

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.