Skip to content

Instantly share code, notes, and snippets.

@joncancode
Last active May 10, 2019 13:46
Show Gist options
  • Save joncancode/036cae96f604bdd3838494c5dc87293c to your computer and use it in GitHub Desktop.
Save joncancode/036cae96f604bdd3838494c5dc87293c to your computer and use it in GitHub Desktop.
/* You can put your stuff in a repl.it or wherever you think is best
Work with a partner to create a specific animal object (so, monkey, rhino, etc), which has the following properties (or more!):
* name
* species
* foodsEaten
And the following methods:
* eatSomething(thingAsString)
* introduce: producers a string introducing itself, including its name, species, and what it's eaten.
Create three species of your animal total. Make sure all three have all properties set and methods defined.
Exercise your animals by retrieving their properties and using their methods. Practice using both syntaxes
for retrieving properties (dot notation and brackets).
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment