Notice how we’re referencing other.#x and other.#y. By accessing the private fields, we are assuming that other is an instanceof our class Point.
JavaScript’s new #private class fields
Jamie Kyle
36128

Does this make sense to you? If other.#x is private… why it’s being accessed in this context? Why other being an instance of the same class matters?

Like what you read? Give Demián Andrés Rodriguez a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.