How to Undo and Redo?

Look up “command pattern”.

Here is a javascript example I just found:

4 Likes