That would be great if you want to do it. Anyway I would try to implement some sort of Command pattern with the ability to "redo" the command as well (something I missed in this tutorial) 🤔, so the friends array are constructed based on the actions performed, and not maintaining two separate arrays.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That would be great if you want to do it. Anyway I would try to implement some sort of Command pattern with the ability to "redo" the command as well (something I missed in this tutorial) 🤔, so the friends array are constructed based on the actions performed, and not maintaining two separate arrays.