Medium
What will the following class-based code log?
1class Counter {2 constructor() {3 this.count = 0;4 }56 increment() {7 this.count++;8 return this;9 }1011 reset() {12 this.count = 0;13 return this;14 }15}1617const counter = new Counter();18counter.increment().increment().reset();19console.log(counter.count);