Skip to content

Instantly share code, notes, and snippets.

Created December 2, 2014 21:24
What would you like to do?
Object JavaScript - Review
function Cat(name) { = name; = function() {
console.log( + " says meeow!" );
var cat1 = new Cat("felix");; //sends "felix says meeow!" to the console
var cat2 = new Cat("ginger");; // sends "ginger says meeow!" to the console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment