iris/_examples/intermediate/cloud-editor/www/scripts/app.ts

17 lines
252 B
TypeScript
Raw Normal View History

class User{
private name: string;
constructor(fullname:string) {
this.name = fullname;
}
Hi(msg: string): string {
return msg + " " + this.name;
}
}
var user = new User("kataras");
var hi = user.Hi("Hello");
window.alert(hi);