Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
let Stark = function(data) {
this.name = data.name;
this.status = data.status;
}
let Jon = new Stark({ name: 'Jon', status: 'Zombie' });
let Robb = new Stark({ name: 'Robb', status: 'Dead' });
console.log(Jon); // { name: 'Jon', status: ‘Zombie' }
console.log(Robb); //{ name: 'Robb', status: ‘Dead' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment