Static & Private Class Fields
What is the purpose of the private static #idCounter?
class Component {
static #idCounter = 0;
#id;
constructor() {
this.#id = `component-${Component.#idCounter++}`;
}
getId() {
return this.#id;
}
}