I'm very new in JS And i get stuck with simple(?) problem about Classes
All i need to do is just to put some string into code to make assert expression valid
class Rec {
constructor() {
let a = 0;
this['put here'] = () => a+++a;
}
}
let inst = new Rec();
console.assert(
inst == 1 && inst == 3 && inst == 5
);
Noticed the Class has endless chain of values like
__proto__:
constructor:
prototype:
constructor:
prototype:
...etc
so I've tried to use __proto__ but got a Function.prototype.toString requires that 'this' be a Function error.