JavaScript, Functional Programming, Web Development, State Encapsulation, Javascript State.
this: const x = MyObj3(0) The myVal variable is essentially private, which means we can no longer access it using x.myVal like in the other implementations above. Instead we have to call the getter function: x.get() In some ways, this is a drawback of this approach, but it can also be considered a