mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
c6b22c57f8
Co-authored-by: Fábio Santos <fabiosantosart@gmail.com>
17 lines
219 B
JavaScript
17 lines
219 B
JavaScript
var a = 0,
|
|
b = 0;
|
|
var foo = {
|
|
get c() {
|
|
a++;
|
|
return 42;
|
|
},
|
|
set c(c) {
|
|
b++;
|
|
},
|
|
d: function () {
|
|
this.c++;
|
|
if (this.c) console.log(a, b);
|
|
},
|
|
};
|
|
foo.d();
|