Cow Herd Generator
$3
This is a simple JavaScript script that generates a herd of cows and a flock of chickens. It randomly assigns names, colors, and ages to each animal and then describes them.
$3
The script generates a herd of cows by randomly selecting names, colors, and ages from predefined lists. Each cow is then instantiated with these attributes and added to the herd.
$3
Similarly, the script also generates a flock of chickens using predefined lists of names, colors, and ages. Each chicken is instantiated with these attributes and added to the flock.
$3
To run the script, simply execute the
main function. This will generate the cow herd and chicken flock and display their descriptions in the console.
$3
#### Cow Herd
- A black cow, 8 years old, named Bessie.
- A brown cow, 6 years old, named Spot.
- A white cow, 10 years old, named Daisy.
#### Chicken Flock
- A white chicken, 12 months old, named Penny.
- A brown chicken, 8 months old, named Nugget.
- A black chicken, 18 months old, named Cluck Cluck.
Additional Notes
This script is for demonstration purposes and can be customized further as needed.