Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created February 9, 2017 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/d3c2e670718b9b554dedd95554e57f41 to your computer and use it in GitHub Desktop.
Save codecademydev/d3c2e670718b9b554dedd95554e57f41 to your computer and use it in GitHub Desktop.
Codecademy export
function Person(name,age) {
this.name = name;
this.age = age;
this.species = "Homo Sapiens";
}
var sally = new Object(Person);
sally.name("Sally Bowles");
sally.age(39);
sally.species(species);
var holden = new Object(Person);
holden.name("Holden Caufield");
holden.age(16);
holden.species(species);
console.log("sally's species is " + sally.species + " and she is " + sally.age);
console.log("holden's species is " + holden.species + " and he is " + holden.age);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment