Created
August 26, 2015 11:33
-
-
Save debugmodedotnet/ef6b5626c2dd924444e5 to your computer and use it in GitHub Desktop.
This file contains 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 Student { | |
name: string; | |
age: number; | |
constructor(name: string, age: number) { | |
this.name = name; | |
this.age = age; | |
} | |
Print() { | |
alert(this.name + " is " + this.age + " years old !!"); | |
} | |
} | |
window.onload = () => { | |
var stud1 = new Student("DJ", 33); | |
stud1.Print(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment