I have some JS code that when the user clicks the add"add" button, some text is displayed to a textarea.
The code seems to be working OK. However, I realize I must refactor the code so that I am using only the one on click
function instead of the six that I have for each of the 6 add buttons.
I have made many attempts at this, searched google and read a lot of SO posts, but each attempt I have does not work.
Can someone give me some advice on this, I am going around in circles and not coming close to refactoring this code.
Here is my code: