Skip to content

Jng617/GA-Homework2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

GA-Homework2

Homework for GA - Javascript Development

Regular Expressions with Iterators Lab / Homework

  • For this exercise we will be working with this array: ["Cat", "Dog", "Polar Bear", "Grizzly Bear", "Antelope", "Kangaroo", "Bear"]

  • Using .filter()

    • Return an array with only animals that have three-letter names.
    • Return an array with only animals that have two-word names.
    • Return an array with only animals that don't start with the letter K.
  • Using .map()

    • Return an array that changes all animal names containing "bear" to "Teddy Bear".
    • Write a regular expression that checks if the animal is either cat or dog. If it is cat, replace the value with "Kitty Cat" and if it is a dog replace the value with "Puppy".
  • Bonus: Use constructors and prototypes to set this functionality up in an object-oriented way.

About

Homework for GA - Javascript Development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published