0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/cli/tests/testdata/run/es_private_fields.js

16 lines
202 B
JavaScript
Raw Normal View History

class Foo {
#field = "field";
setValue(val) {
this.#field = val;
}
getValue() {
return this.#field;
}
}
const bar = new Foo();
bar.setValue("PRIVATE");
console.log(bar.getValue());