I am currently developing a multiple choice quiz where users can input their own questions and answers to create a quiz. I am facing an issue with allowing users to delete questions stored in the question bank.
Here is what I have tried so far:
bodyText = bodyText + '<button onClick="questionBank.splice(1,1)">Delete me</button>';
I am struggling to make it so that when the user clicks on the button, it deletes the specific element in the array to which the button is attached. I realize that the splice (1,1) function is only deleting the first element in the array, not the element associated with the button.