• + 4 comments

    here we pushing the before appending a new one because when there will be a undo we can directly take the previous string from stack annd assign this value to present string.

    hope it helps