Create a gist now

Instantly share code, notes, and snippets.

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