0
Hours
0
Minutes
0
Seconds

How to implement the Increment function?
@Akash Pal

890
68

If you have to implement the following Increment function then how would you do it?

let increment1 = new Increment();
let increment2 = Increment();

console.log(increment1 == +increment2); // true
console.log(`val: ${increment1}`); // val: 1
console.log(`val: ${increment1}`); // val: 2
console.log(`val: ${increment1}`); // val: 3

Loading IDE...