08. Conditional Loops πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ—οΈ Conditional Loops

Implement the following user story:

  • As a developer I want an app that will print an array of animals, but will also alert the user if any of the animal names begin with a “c” or an “o”

Acceptance Criteria

  • Loop through the following array and log the name of each animal:

var myFarm = ["chickens", "pigs", "cows", "horses", "ostriches"];

  • Alert the user if the first letter of an animal’s name begins with a “c” or an “o”

πŸ’‘ Hints

How can you access the first character of a string?

βœ… Solutions

Solutions Click Here