cowherdafhenerator
v2.1.2
Published
This simple JavaScript script generates a herd of cows in a pastoral setting. It creates random cows with different colors and ages and describes them in the console.
Downloads
4
Maintainers
Readme
Cow Herd Generator
Description
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.
Cow Generation
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.
Chicken Generation
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.
Running the Script
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.
Example Output
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.