Skip to content

Instantly share code, notes, and snippets.

@Chryus
Created January 22, 2014 03:12
Show Gist options
  • Save Chryus/8552893 to your computer and use it in GitHub Desktop.
Save Chryus/8552893 to your computer and use it in GitHub Desktop.
var polar_bear = Object.create(yeti);
polar_bear.appetite = "huge";
var seal = Object.create(polar_bear);
seal.appetite = "big";
var arctic_hare = Object.create(seal);
var snow_mouse = Object.create(arctic_hare);
var snow_mole = Object.create(snow_mouse);
snow_mole.appetite = "tiny";
console.log(yeti.find()); //gigantic
console.log(polar_bear.find()); //huge
console.log(seal.find()); //big
console.log(arctic_hare.find()); //big
console.log(snow_mouse.find()); //big
console.log(snow_mole.find()); //tiny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment