How can i read the value of all the textarea when button is clicked such that, i should store that value with its corresponding id's . I tried inputs.map(input => input.innerHTML); this but this only get me the content not the id's with it ``` I just want to store id and its corresponding value into formdata.
function submitworksheet(){
let formData = new FormData();
let inputs = Array.from(document.querySelector(".worksheet"));
let formDataArray = inputs.map(input => input.innerHTML);
let x;
for (x of formDataArray) {
formData.append(x + x);
}
}
<div class="worksheet" id="ws">
<p>I learned that the message is to never give up.</p>
<textarea id="1"></textarea>
<p>I'll be so excited when summer break arrives.</p>
<textarea id="2"></textarea>
<p>When are we eating?</p>
<textarea id="3"></textarea>
<button onclick="submitworksheet()" >Submit</button>
<div>