Find a Pet
Search for just the right one.
Skills: InputOutputVariablesLoopsArraysObjects
Brief
Write a program that lets the user enter a type of pet, and then outputs a list of all the pets of that type.
Hint: you'll need to store a group of objects together... perhaps an array might help.
Here are some links to explanations that might help with this project:
-
if
statements on javascript.info -
if
statements on W3 Schools - arrays
[ ]
on javascript.info - loop through an array:
forEach
on javascript.info - objects
{ }
on javascript.info - objects
{ }
on W3Schools
Use the code below to get you started. Copy and paste the HTML into your own file. You do not need to write any more HTML to complete this project.
You can use the JavaScript below if you need help to get started. It contains everything you need for this program.
If you can, try to complete the project without looking at it.