Question PRG-JS-0046
MediumWhat is the output of this program?
const o = { n: 1, inc() { this.n++; return this; } };
o.inc().inc();
const { n, m = 7 } = o;
console.log(n, m);
- A.
2 7
- B.
3 7
- C.
Sign up free to see the answer and a step-by-step explanation.