Closed a1mersnow closed 5 years ago
let o = { f(x, y) { return x + y + this.z; }, z: 0 }; const g = o.f(?, 3); g(1); // 4 // replace the value of `o` o = { f(x, y) { return x + y + this.z; }, z: 2 }; g(1); // 6 // replace the value of `o.f` o.f = (x, y) => x * y; g(1); // 5
the last one should be 3 ?
This example was removed in a recent update. Current examples should be clearer.
the last one should be 3 ?