class Counter {
public count = 0
incBy(value: number) {
this.count += value
}
incByAmount(
value: number, amount: number) {
this.count += value * amount
}
}
let counter = new Counter()
counter.incBy(1)
//counter.count is 1
console.log("count is", counter.count)
counter.incByAmount(2, 5)
//counter.count is 11
console.log("count is", counter.count)