Last active
January 28, 2017 01:58
-
-
Save dupski/c278e57c3170cff2cb6254a71b820361 to your computer and use it in GitHub Desktop.
EnterpriseJs - Part 2 - TypeScript Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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