Skip to content

Instantly share code, notes, and snippets.

@AliN11
Created August 3, 2019 15:11
Show Gist options
  • Save AliN11/22df8de14de75a35e0072817344a4a09 to your computer and use it in GitHub Desktop.
Save AliN11/22df8de14de75a35e0072817344a4a09 to your computer and use it in GitHub Desktop.
class Person {
name: string;
constructor(name: string) {
this.name = name;
}
sayHello(): string {
return `Hello ${this.name}, Welcome to Ditty.ir`;
}
}
let p = new Person("Rafael Nadal");
console.log(p.sayHello());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment