So I have some papers called "paper_0", "paper_1", etc. and I want to store them this way:
<h2 id="paper_0" onclick="doThing(this.id, 'myFunction')">Name of this thing</h2>
and in my javascript file:
//some code here
function doThing(id, func){
currentId = id; //store current game
func(); //this would create paper_0 **error**
//some code here
}
function removePaper(){
currentId.remove(); // **error**
}
so I have these 2 errors because id and func are both strings.
Any suggestion how can I store the paper objects? Or can I give IDs to papers?