Skip to content

Instantly share code, notes, and snippets.

@phsantiago
Created January 2, 2019 03:13
Show Gist options
  • Save phsantiago/bbcba07e681ee9e4843a3f2d9d8fe727 to your computer and use it in GitHub Desktop.
Save phsantiago/bbcba07e681ee9e4843a3f2d9d8fe727 to your computer and use it in GitHub Desktop.
class Gato {
constructor(nome) {
this.nome = nome;
}
falar() {
console.log(`${this.nome}: Meow!`);
}
};
const Pablo = new Gato('Pablo');
Pablo.falar();
// Pablo: Meow!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment