Can anybody help me to sort out a problem
I have 3 paragraphs and when I click on each paragraph then these paragraphs must be stored into an array.
function makeSelection(e) {
var test =[];
for(var i=0; i<e.children[0].length){
test.push()
}
}
<a href="#" onclick="makeSelection()"><p>This is P1</p></a>
<a href="#" onclick="makeSelection()"><p>This is P2</p></a>
<a href="#" onclick="makeSelection()"><p>This is P3</p></a>
I have 3 paragraphs and when I click on each paragraph then these paragraphs must be stored into an array.
function makeSelection(e) {
var test =[];
for(var i=0; i<e.children[0].length){
test.push()
}
}
<a href="#" onclick="makeSelection()"><p>This is P1</p></a>
<a href="#" onclick="makeSelection()"><p>This is P2</p></a>
<a href="#" onclick="makeSelection()"><p>This is P3</p></a>