- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
class C {
_length: number;
constructor() {
this._length = 10;
}
get length() {
return this._length;
}
set length(value: number) {
this._length = value;
}
}
function main() {
const c = new C();
print(c.length);
c.length = 20;
print(c.length);
delete c;
print("done.");
}