The toString conundrum
Last week, in the course of a technical job interview I was asked this question: How to make console.log(test.plus(6).minus(4)) return 9. The first part, chaining functions, is trivial. As you (should) know, you just need to return the object in each chainable method. function Counter (numInitial) { this.counter = numInitial; […]