Skip to content

Instantly share code, notes, and snippets.

@yogeshkoli
Created September 16, 2019 18:31
Show Gist options
  • Save yogeshkoli/97d7be4c487ac513a4fee6b5a28cfc75 to your computer and use it in GitHub Desktop.
Save yogeshkoli/97d7be4c487ac513a4fee6b5a28cfc75 to your computer and use it in GitHub Desktop.
class Calculation {
constructor(private x: number, private y: number) {}
add() {
console.log(this.x + this.y);
}
}
let calc = new Calculation(10, 20);
calc.add();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment