1.

Create a TypeScript class with a constructor and a function.

Answer»
class IB {
name: string;
constructor(message: string) {
this.name = message;
}
greet() {
return "Hello, " + this.name + "How are you";
}
}
let msg = new IB("IB");


Discussion

No Comment Found