Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created August 26, 2015 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debugmodedotnet/ef6b5626c2dd924444e5 to your computer and use it in GitHub Desktop.
Save debugmodedotnet/ef6b5626c2dd924444e5 to your computer and use it in GitHub Desktop.
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