Skip to content

Instantly share code, notes, and snippets.

@dupski
Last active January 28, 2017 01:58
Show Gist options
  • Save dupski/c278e57c3170cff2cb6254a71b820361 to your computer and use it in GitHub Desktop.
Save dupski/c278e57c3170cff2cb6254a71b820361 to your computer and use it in GitHub Desktop.
EnterpriseJs - Part 2 - TypeScript Class
class Person {
name: string;
age: number;
constructor(name: string) {
this.name = name;
}
greet() {
console.log(‘Hello, ‘ + this.name);
}
}
let bob = new Person(“Bob”);
bob.greet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment