Skip to content

Instantly share code, notes, and snippets.

@goofmint
Last active Jul 9, 2017
Embed
What would you like to do?
var dog = Animal.DogClass.create('Hachi');
$("#dog").val(dog.cry());
// -> Hachi's crying voice is bow wow
var cat = Animal.CatClass.create('Tama');
$("#cat").val(cat.cry());
// -> Tama's crying voice is mew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment