I need to create a kind of a note pad. So, there are two input fields where the user specifies the subject and the message/text itself. Then, as soon as one clicks the button the note appears inside of a div below the input fields. So, what I did, in order to make it happen, push-function for adding something and splice-function in order to delete stuff. If the user does not want to lose his notes I use JSON.stringify and JSON.parse, so basically everything what you need.
The last thing what I need is to add a bin where you can pick up the notes you deleted earlier. I was told that in to do so I need to take the element out of the array, copy it and only then push it into the new array, in this case, called “deleteTitles” and “deleteMessages”.
Unfortuntalty I don’t have a clue where to start off after trying for hours. Any ideas?
I tried a lot of methods which could have even work out, the problem is that I don’t know where and how to place them. Something I tired is the concat method, for loops, splice, push and so on…
Michael Degasperi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.