mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 07:28:03 -05:00
15 lines
254 B
TypeScript
15 lines
254 B
TypeScript
export default function main() {
|
|
class Counter {
|
|
value = 0;
|
|
inc() { this.value++; }
|
|
}
|
|
|
|
let counter = new Counter();
|
|
counter.inc();
|
|
counter.inc();
|
|
const counter2 = counter;
|
|
counter.inc();
|
|
|
|
return [counter.value, counter2.value];
|
|
}
|