JavaScript Design Patterns - Behavioral - Memento
The memento pattern allows capture and externalizes an object’s internal state so that the object can be restored to this state later.
In the example below, we are creating a simple way to store values and restore a snapshot when needed.
class Mement...
nhannguyen.hashnode.dev1 min read