0
Hours
0
Minutes
0
Seconds
You need Login/Signup to run/submit the code.

How to implement the Increment function?

@Akash Pal
1111
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...