mirror of
https://github.com/denoland/deno.git
synced 2024-11-05 09:04:41 -05:00
16 lines
202 B
JavaScript
16 lines
202 B
JavaScript
|
class Foo {
|
||
|
#field = "field";
|
||
|
|
||
|
setValue(val) {
|
||
|
this.#field = val;
|
||
|
}
|
||
|
|
||
|
getValue() {
|
||
|
return this.#field;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const bar = new Foo();
|
||
|
bar.setValue("PRIVATE");
|
||
|
console.log(bar.getValue());
|