classes in ts

Solutions on MaxInterview for classes in ts by the best coders in the world

showing results for - "classes in ts"
Lucia
16 Oct 2020
1class Greeter {  greeting: string;
2  constructor(message: string) {    this.greeting = message;  }
3  greet() {    return "Hello, " + this.greeting;  }}
4let greeter = new Greeter("world");Try